[Solved] : Question 13201

19. Create an abstract class called GeometricFigure. Each figure includes a height, a width, a figure type,
and an area. Include an abstract method to determine the area of the figure. Create two subclasses
called Square and Triangle. Create an application that demonstrates creating objects of both subclasses
and store them in an array. Save the file as GeometricFigure.java, Square.java, Triangle.java and
UseGeometric.java.

20. Modify Lab Exercise 19, 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
GeometricFicure2.java Square2.java, Triangle2.java, SidedObject.java, and UseGeometric2.java


Expert Answer


Answer to : Question 13201

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?