Answered You can hire a professional tutor to get the answer.

QUESTION

make a class Circle with one instance variable of type double called radius.

make a class Circle with one instance variable of type double called radius. Then define an appropriate constructor that takes an initial value for the radius, get and set methods for the radius, and methods getArea and getPerimeter.

make a class RightTriangle with three instance variables of type double called base, height, and hypotenuse. Then define an appropriate constructor that takes initial values for the base and height and calculates the hypotenuse, a single set method which takes new values for base and height and calculates the hypotenuse, get methods for all three instance variables, and methods getArea and getPerimeter.

Then make a test application which queries the user for the needed data to create two Circle objects and two RightTriangle objects. It will then display all information about the four objects. It should then display which Circle object has the largest area and which RightTriangle object has the largest area.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question