Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started