Question: The language is java. Please follow the prompt. This is my study guide to help me study for the upcoming test. Thank you Section Ill:
Section Ill: Complete program writing: The following polymorphism and inheritance is defined Shape Rectangle Cone RectangularPrism Here are the parameters and methods of each class: Shape: Parameter String name; I/ such as rectangle, circle, cylinder etc. Methods: Constructors getName Area Volume /I to get name of a shape //computes area of a shape II computes volume of a shape Rectangle: Parameter int length; int width; Methods: Constructors Area//computes area of a shape (length x width) Volume /computes volume of a shape (length x width x height) Cone: Parameter double radius(r) double height (h Methods: Constructors Area//computes area of a shape (nrir h Volume/ computes volume of a shape (ar
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
