Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write the JAVA CODE in computer, No handwritten code Implement the inheri

ID: 3705771 • Letter: P

Question

Please write the JAVA CODE in computer, No handwritten code

Implement the inheritance hierarchy shown in Figure 1. Have Point class, Circle class and Cylinder class cach in a separate corresponding java file. Have the Homework3_1 test driver class create point, circle and cylinder objects and store them in a Point Array. Print out on screen all the objects' attributes in the array via their toString) methods (which you will need to overwrite for cach class). Loop over the elements of the array and test the object type, if it is a circle, invoke the area () method on the circle object, and if it's a cylinder then invoke area () and volume () methods, and print all the results. You can statically store the points' information in your test driver class. Point #x : int #y : int Circle #radíus : double +area() double Cylinder #height: double +volume): double +area) : double Figure 1 Inheritance Hierarchy for Exercise 1

Explanation / Answer

Hi Dear,

Please find my implementation:

Output:

(4,5)
(4,5), area: 140.9546
(4,5), area: 618.5172, volume: 1127.6368

140.9546
618.5172

Process finished with exit code 0

Please DONT forgot to rate my answer. We are working hard for you Guys!!