Question: ** Use the class diagram and complete the following task. Must code in Java and must use comments in the code** GeometricObject -area: Double +GeometricObjecto

 **Use the class diagram and complete the following task. Must code **Use the class diagram and complete the following task. Must code in Java and must use comments in the code**

GeometricObject -area: Double +GeometricObjecto +getArea(): Double +setArea(area: Double):void Triangle -sidel: double -side2: double -side3: double Rectangle -sidel: double -side2: double +Triangle(sidel: double side2: double side 3: double ) +setArea(): void +Rectangle(sidel: double side2: double ) #setArea(): void Compare AreaInterface KE extends GeometricObject)compareArea(triangle:E, rectangle:E):boolean Write a test class that implements Compare AreaInterface interface; in the main method create two objects of a Triangle, and a rectangle. With the help of compareArea(), compare area of two objects and print appropriate message

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!