Question: The GeometricShape interface will have one method, area, which takes no parameters and returns a double. You are provided with three classes: Parallelogram, Circle, and

The GeometricShape interface will have one method, area, which takes no parameters and returns a double.

You are provided with three classes: Parallelogram, Circle, and RightTriangle. Modify the classes so that they implement the GeometricShape interface. Supply the appropriate method for each class.

Use Math.PI.

Notice in InterfaceRunner for the final version that the objects are added to an ArrayList of GeometricShapes.

Please use this to check: http://www.codecheck.it/files/1708010540d7ftloi3nl8jvbuf331woq7tg

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!