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]
3 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]3 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
What therapeutic exercise profession is thought by many to be synonymous with sports medicine (though it is actually an incorrec
Crank

Answer:

Athletic training

3 0
2 years ago
What is the highest position a pediatrician could get?
antoniya [11.8K]

Answer:

Pediatricians that have "FAAP" after their names.

Explanation:

Only board-certified pediatricians can add the designation "FAAP" after their names, which means they have reached the highest status of membership in this professional organization.

7 0
3 years ago
Two things formed when wood is burnt​
almond37 [142]
Carbon dioxide and water
5 0
3 years ago
What type of evidence produced through quantitative research would be helpful to better understand the selected practice issue?
AfilCa [17]

Answer:

Numerical type of evidence.

Explanation:

Numerical type of evidence produced through quantitative research that would be helpful to better understand the selected practice issue. Quantitative research is the process of collecting and analyzing numerical data so we can say that for numerical type of evidence is formed and analyzed with the help of quantitative research and it will help to understand the problem.

5 0
4 years ago
What Helps Treat a Fever?
irinina [24]

Answer:

Tylenol

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • How do you know if you have rheumatoid arthritis
    11·1 answer
  • Dr. Ramos discussed how difficult it could be to treat infection
    14·1 answer
  • A strong dependence on a drug or substance<br> is known as a/an ______ .
    14·1 answer
  • The pulmonary artery carries oxygenated blood.<br> a. True<br> b. False
    13·1 answer
  • Glycoproteins _______.
    12·1 answer
  • Whats another word for ibuprofen?
    14·1 answer
  • What is the biggest number
    10·2 answers
  • A family member brings the client to the clinic for a follow-up visit after a stroke. The family member asks the nurse what he c
    6·1 answer
  • Those who examine external forces on behavior take the side of ________, while those who focus on internal factors take the side
    5·1 answer
  • which response would the nurse make to a client with schizophrenia who tells the nurse, ‘everyone hates me'? quizlet
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!