1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VashaNatasha [74]
2 years ago
8

Design and implement your own simple class to represent any household item of your choice (toaster, fan, hair dryer, piano ...)

Your class should have a constructor, one additional method and at least one member variable (e.g. boolean isOn to turn the item on or off). Be sure you demonstrate your class works properly by constructing an instance of it and calling your method.
Medicine
1 answer:
jeyben [28]2 years ago
7 0

Answer:

public class Fan {

/** Main method */

public static void main(String[] args) {

 final int SLOW = 1;  // Fan speed slow

 final int MEDIUM = 2; // Fan speed medium

 final int FAST = 3;  // Fan speed fast

 // Create two Fan objects

 Fan fan1 = new Fan();

 Fan fan2 = new Fan();

 

 fan1.setSpeed(FAST);

 fan1.setRadius(10);

 fan1.setColor("yellow");

 fan1.turnOn();

 

 fan2.setSpeed(MEDIUM);

 fan2.setRadius(5);

 fan2.setColor("blue");

 fan2.turnOff();

 System.out.println(fan1.toString());

 System.out.println(fan2.toString());

}

}

You might be interested in
To produce a louder sound, also known as _______________________, the Vocal Folds vibrate faster
OleMash [197]

Answer: When your vocal cords produce a louder sound, it is known that the vibrating vocal cords produce sound waves.

Explanation:

3 0
3 years ago
The text says that “pathogens require large and dense populations for
igor_vitrenko [27]
Since pathogens are easily passed from person to person, they need large populations to spread and survive. If they did not have a large population, the pathogens would die out.
4 0
3 years ago
Which of the following are key to keeping serious illnesses arise?
fiasKO [112]

Answer:

to cure/ prevent an illness: wash hands, stay away from others, take prescription drugs ( if told too), temperature check, etc

To make it worse: Walk/ stand very close to people, not be sanitary, make others sick intentionally, etc

Explanation:

hope this helps you and have a great day

4 0
2 years ago
Read 2 more answers
Question 2
Degger [83]
Can you edit it so I can answer your question please
7 0
2 years ago
Read 2 more answers
This test confirms that your friend's dad has bacterial pneumonia. What medication might the doctor prescribe to treat this infe
svlad2 [7]
For adults, the most common treatment for bacterial pneumonia is macrolides antibiotics. For example azithromycin or erythromycin. For children however, amoxicillin would be used.
3 0
2 years ago
Other questions:
  • 4. Select the TRUE statement:
    6·1 answer
  • _________ percent of sperm are deformed or imperfect in some way.
    13·1 answer
  • Please Help... I will give 1000 points to the brainliest
    7·1 answer
  • WHAT SCHEDULE OF DRUG IS OVER THE COUNTER COUGH MEDICINE?
    11·2 answers
  • Which lobe is found in the area designated by label 3?
    6·2 answers
  • ¡Checa esta app! Hay millones de estudiantes ayudándose entre otros con sus tareas escolares. https://brainly.app.link/qpzV02Maw
    13·1 answer
  • Please answer this question and read the directions Ill mark you the brainliest if you do answer it correctly thank you! Don't a
    9·1 answer
  • Respiratory system anatomy labeling:<br> What is number 8?
    7·1 answer
  • Shearing is best described as
    5·1 answer
  • The type of traction in which a pin, wire, tongs, or other device is surgically inserted through a bone is:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!