go to previous page   go to home page   go to next page highlighting

Answer:

public Cone( double radius, double height )
Creates a new instance of a Cone object with the specified height and radius

You could have picked other names for the parameters. But they should be of type double.


Constructor for the Cone class

Here is more of our design:



Cone

A class that represents a right circular cone

Variables

Constructor

Methods


Constructors are usually made public.


QUESTION 3:

Decide on some methods that Cone objects will have.


go to previous page   go to home page   go to next page