Question: Create an abstract class, called Shapes. In the class, declare a constant PI whose value is 3.14159, and declare an abstract method, call getArea() which
Create an abstract class, called Shapes. In the class, declare a constant PI whose value is 3.14159, and declare an abstract method, call getArea() which returns a double. Then,
A. Create a class, called Circle, which extends the Shape class, and has its own data member(s), constructor(s), mutator(s), and accessor(s).
B. Create a class, called Rectangle, which extends the Shape class, and has its own data member, constructor(s), mutator(s), and accessor(s).
C. Test two classes in an application class. At least display areas of a circle and rectangle.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
