Question: Modify Exercise 10, adding an interface called SidedObject that contains a method called displaySides(); this method displays the number of sides the object possesses. Modify
Modify Exercise 10, adding an interface called SidedObject that contains a method called displaySides(); this method displays the number of sides the object possesses. Modify the GeometricFigure subclasses to include the use of the interface to display the number of sides of the figure.
Create an application that demonstrates the use of both subclasses. Save the files as GeometricFigure2.java, Square2.java, Triangle2.java, SidedObject.java, and UseGeometric2.java.
Step by Step Solution
3.36 Rating (168 Votes )
There are 3 Steps involved in it
public abstract class GeometricFigure2 implements SidedObject protected int height protected int wid... View full answer
Get step-by-step solutions from verified subject matter experts
