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

Answer:

Of course!


Class Definition

Here is a skeleton for the Cone class.

public class Cone
{
  // instance variables


  // constructor


  // methods

}

Recall that dividing the code into three sections, as above, is a matter of style. It is not a syntax rule of the language. But this is how Java is usually written.

The source file must be named Cone.java.


QUESTION 5:

What data type should be the instance variables for Cone ?


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