Java
Design a class named Fan to represent a fan. The class should have: 1. Three constants named SLOW, MEDIUM, and FAST with the values 1, 2 ,and 3 to denote the fan speed. 2.A private int data field named speed that specifies the speed of the fan (the default is SLOW) 3.A private boolean data field named on that specifies whether the fan is on (the default is false). 4. A private double data field named radius that specifies the radius of the fan (the default is 5). 5.A String data field named color that specifies the color of the fan (the default is blue). 6. The accessor and mutator methods for all four data fields. 7. A no-arg constructor that creates a default fan. 8. A method named toString() 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 not on, the method returns the fan color and radius along with the string âfan is offâ in one combine String. đđ» https://code.sololearn.com/cr5kj5nlD1LC/?ref=app