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
A new patient is admitted to a long-term care center. While helping the patient get situated in her new room, the nursing assist
LenaWriter [7]

Answer:

The nursing assistant would put "Patient wants the quickest but most affective treatment

Explanation:

3 0
3 years ago
What is the reason you are unable to do basic research on humans?
AysviL [449]

Answer:

Explanation: Researching on humans isn't something you can typically do because there are typically ethical issues with testing on humans.

3 0
3 years ago
The balance sheet reports what?
Vikki [24]

Answer:

balance sheet is a financial statement that reports a company's assets, liabilities and shareholders' equity at a specific point in time, and provides a basis for computing rates of return and evaluating its capital structure

Explanation:

hope this helps

8 0
3 years ago
Read 2 more answers
Regulation of the cell cycle is carried out by which
taurus [48]

Answer:

I would say CdKs and cyclins the reason why I am not saying this with some ambiguity is because these all technically effect/regulate the cell cycle.

4 0
3 years ago
Read 2 more answers
Morning to each of you​
shepuryov [24]

Answer:

you can find your answers in this link by copying or clicking:

17ebook.co

7 0
2 years ago
Read 2 more answers
Other questions:
  • Suzanne was diagnosed with lymphocytopenia. Lymphocytes are white blood cells, so which best describes Suzanne’s condition?
    8·1 answer
  • The order is for cefazolin (Ancef) 250mg. Using a 1gm/mL vial, how many milliliters is administered?
    5·1 answer
  • Happy to help anyone with any question :) Also giving brainliest
    5·2 answers
  • Values of esr in different pathalogical condition
    10·1 answer
  • Which common eye Injury usually clears up on its own in about three days?
    9·2 answers
  • How many cells does the human body have?​
    7·2 answers
  • The Dietary Guidelines recommend limiting intake of ______ to less than 10% of calories starting at age 2.
    7·1 answer
  • An autoimmune disorder that affects children ages 16 years or younger, with symptoms that include stiffness, pain, joint swellin
    9·1 answer
  • Online Engagement with Surgical Treatments for Benign Prostatic Hyperplasia: Are Minimally Invasive Surgical Therapies Outpacing
    14·1 answer
  • The primary health care provider (PHCP) has prescribed codeine sulfate for a client with a nonproductive cough to suppress the c
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!