import java.awt.Color;
public class ColoredSphere extends Sphere {
  private Color color;

  public ColoredSphere(Color c) {
  // Constructor: Creates a sphere and initializes its 
  // radius to 1.
  // Precondition: c is the desired color.
  // Postcondition: A sphere of radius 1.0
  // and color c exists.
    super();
    color = c;
  }  // end constructor

  public ColoredSphere(Color c, double initialRadius) {
  // Constructor: Creates a sphere and initializes its 
  // radius.
  // Precondition: initialRadius is the desired radius,
  // c is the desired color.
  // Postcondition: A sphere of radius initialRadius
  // and color c exists.

    super(initialRadius);
    color = c;
  } // end constructor

  public void setColor(Color c) {
  // Sets the color of the sphere.
  // Precondition: c is the desired color.
  // Postcondition: The sphere color is now c.
    color = c;
  }  // end setColor
  
  public Color getColor() {
  // Returns the color of the sphere.
  // Precondition: c is the desired color.
  // Postcondition: None.
    return color;
  }  // end getColor
}  // end ColoredSphere
