Question: Write a java program Define an interface named GeometricShape with a single method named area1 that calculates the area of the geometric shape: Implement the

Write a java program Define an interface named GeometricShape with a single method named area1 that calculates the area of the geometric shape:

Implement the GeometricShape interface for Rectangle, Circle and Triangle class.

Implement a class CalculateAreas that has a function that takes Geometricshape type array of objects and builds an array of (double values) values for each corresponding shapes.

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!