Question: Write the interface calledGeometricObjectwhich declares two methodsgetPerimeter() andgetArea(). Write the implementation class Circle, with a protected variable radius, which implements the interfaceGeometricObject. TheclassResizableCircleis defined as
Write the interface calledGeometricObjectwhich declares two methodsgetPerimeter() andgetArea(). Write the implementation class Circle, with a protected variable radius, which implements the interfaceGeometricObject. TheclassResizableCircleis defined as a subclass of the class Circle, which also implements an interface called Resizable. The interface Resizable declares an abstract methodresize(), which modifies the dimension (such as radius) by the given percentage. Write the interface Resizable and the classResizableCircle. test program calledTestResizableCircleto test the methods defined in Circle andResizableCircle.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
