Question: JAVA Define an abstract class called GeometricFigure with height and width attributes. Include an abstract method to calculate the surface area of the object. Define
Define an abstract class called GeometricFigure with height and width attributes. Include an abstract method to calculate the surface area of the object. Define TWO (2) subclasses named Square and Triangle that inherit the abstract class GeometricFigure. Define all abstract methods accordingly. Define a Java interface called SizeComparable that contains an abstract method called comparesize(). This method will compare the surface area of two Geometric Figure objects and display whether the object surface area is smaller, larger or equal to the other object's surface area. Provide another class with the main () method to demonstrate the above concepts. (25 Mark)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
