Save your files here: .../APCSA_1/apcsa-assignments-YourUsername/homework/21_inheritance_more_shapes/
-
Write a superclass Circle. The instance variable should be radius. There will be one constructor to initialize the instance variable. The following methods should be implemented: getRadius(), toString(), getArea().
-
Write a subclass Cylinder which extends from Circle. Define the instance variable height. There will be one constructor to initialize the instance variable. The following methods should be implemented: getHeight(), getVolume(), getArea(), toString(). If you are overriding a method, please use the @Override annotation.
-
Write a Driver.java to test your code.