I'm learning about classes at the moment, and I'm working on one of the exercises in my book. Here is the exercise description:
Create a class called Triangle that stores the length of the base and height of a right triangle in
two private instance variables. Include a constructor that sets these values. Define two
functions. The first is hypot( ), which returns the length of the hypotenuse. The second is area( ),
which returns the area of the triangle.
But it outputs some odd numbers, and they are the same all the time, even if I change the values of ob1 to something else than 10. Any help would be greatly apreciated!