Question: A] Create an abstract class named FigureAbstarctClass. i) This class has attributes: figure type, height, width, and area. ii)The class has also an abstract method
A] Create an abstract class named FigureAbstarctClass.
i) This class has attributes: figure type, height, width, and area.
ii)The class has also an abstract method that calculated the figure area.
B] Moreover, define two derived classes named
SquareClass and TriangleClass. These classes will implement the abstract method for their corresponding area calculation and updating area.
C] Finally, create a Java application that includes object creation of both derived classes, and then store them in an array (not arrayList). Display the information of both objects using Polymorphism
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
