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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!