[CODE=Java]
public class Fan
{
/**

  • A class to represent a fan, whether it be on/off, with varying speeds, fan size and colors.
    */

    //Main method shouldn't have been here, this class is for your object.

    //Global variable declarations
    private fanSpeed;
    private double radius;
    private Color fanColor;
    private boolean isOn;

    public Fan( )
    {
    fanSpeed = 1; //Default speed
    isOn = false; // Off by Default
    radius = 5; //Default radius
    fanColor = Color.WHITE; //Default color
    }

    //You had Fan(){} here, no point, it didn't do anything, see above method. This initialises everything for you, and its where you're defaults should be set.

    //You had Fan( double radius = 5 ){} here, again, no point, as this won't compile, the argument goes nowhere, and doesn't initialise anything. This is done above.

    /**

  • A method to view the speed of the fan.
  • @return The numerical representation of the speed of the fan.
    */

    public int getSpeed( )
    {
    return fanSpeed;
    }

    /**

  • A method to set the speed of the fan.
  • @param _fanSpeed The new speed of the fan in the range 1 - 3.
    */

    public void setSpeed( int _fanSpeed )
    {
    if ( _fanSpeed >= 1 && _fanSpeed <= 3 )
    fanSpeed = _fanSpeed;
    else // Otherwise leave it where it is
    return;
    }

    /**

  • A method the check if the fan is currently on or off. Wasn't included.
  • @return True if the fan is on.
    */

    public boolean isOn( )
    { ...

commented: Point them in the right direction, do not do their homework for them, that is against the daniweb terms of use, and it doesn't help them. Do you really think the OP will even look at the code you wrote, or simply turn it in, as is, as his own? -1