Class Implementation


Class Structure: State & Constructors

 
/** Class documentation goes here.
 */
public class Ball
{
  // State: instance variables go here.
    private Color ballColor;
    private String type;
    private float diameter;

  // Constructors

    /**  Constructor documentation goes here.
     */
    public Ball(Color col, String category, float diam)
    {
        // initialise instance variables
        this.ballColor = col;
        this.type = category;
        this.diameter = diam;
    }

  // Methods

}

Alyce Brady, Kalamazoo College