Question: Write the interface called GeometricObject, which declares two abstract methods: getPerimeter ( ) and getArea ( ) , as specified in the class diagram below.
Write the interface called GeometricObject, which declares two abstract methods: getPerimeter and getArea as specified in the class diagram below.
Write the implementation class Circle which implements the interface GeometricObject.
The class ResizableCircle is defined as a subclass of the class Circle, which also implements an interface called Resizable, as shown in class diagram below. The interface Resizable declares an abstract method resize which modifies the dimension such as radius by the given percentage. Write the interface Resizable and the class ResizableCircle.
The class Circle must contain a main in which you must test the methods defined in Circle and ResizeableCircle.
Example Interaction:
The output assuming a radius of and a percentage reduction of should be as follows:
Perimeter of the circle is
Area of the circle is
Perimeter of the resized circle is
Area of the resized circle is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
