Implement a class Cylinder whose constructor has a parameter to represent the radius of a cylinder’s base and another parameter to represent a cylinder’s height. Define the methods getRadius,...


Implement a class Cylinder whose constructor has a parameter to represent the radius of a cylinder’s base and another parameter to represent a cylinder’s height. Define the methods getRadius, getAreaOfBase, getCircumference, getHeight, getVolume, getSurfaceArea, and toString. Do not use the class Circle.


Test your class using a driver that creates two different cylinders and calls each method of each cylinder.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here