Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

CSCI2467 Extra credit (5 points) Create an external class called Cylinder which has two private instance variables (radius = 1.0 and height = 1.

CSCI2467

Extra credit (5 points)

Create an external class called Cylinder which has two private instance variables (radius = 1.0 and height = 1.0)

Create a construction that does not receive any parameters and a second constructor that receives newRadius and newHeight.

Create a getRadius() and getHeight() method that returns the radius and height of the cylinder.

Create a getVolume() method that returns the volume of the cylinder.

Create a driver class called MyCylinder that constructs three Cylinder objects. The first calls the no argument constructor, the second sends the following arguments (4.0, 6.0). The third prompts the user to input two class variables (myRadius and myHeight).

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question