Hello programmers ^^
i 'am new here... so..
i got assignment from my lecture.
• Three static constants named SLOW, MEDIUM, and FAST with the values 1, 2, and 3 to denote the fan speeds.
• A private int data filed named “speed” that specifies the speed of the fan, default to slow.
• A private Boolean data field named “on” that specifies whether the fan is on, default to false.
• A private double data field named “radius” that specifies the radius of the fan, default to 5.
• A private string data field named “color” that specifies the color of the fan, default to “blue”.
• A properties for all 4 data fields.
• A no-argument constructor that creates a default fan.use this ref.
• A one-argument constructor that creates fan. provide speed value.
• A two-argument constructor that creates fan. provide speed and on value.
• A three-argument constructor that creates fan. provide speed , on , and radius value
• A four-argument constructor that creates fan. provide speed , on , radius , and color value.
• A DisplayFan( ) method that returns a string description for the fan. If the fan is on, the method returns the fan speed, color, and radius in one combined string. If the fan is off, the method returns the fan color and radius along with the string, “fan is off” in one combined string.
The Fan Application class
• Write a test program that creates two Fan objects.
• Fan Object 1 inputs:
o Assign Fastest Speed.
o Assign a radius 10
o Assign the color yellow
o Turn the fan on.
• Fan Object 2 inputs:
o Assign Medium Speed.
o Assign a radius 5
o Assign the color blue
o Turn the fan off.