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
MaRussiya [10]
3 years ago
7

Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off. The follow

ing methods provide these behaviors: turnon and turnoff. Both methods accept no arguments and return no value. Assume there is a reference variable officeAC of type AirConditioner. Create a new object of type AirConditioner and save the reference in officeAC. After that, turn the air conditioner on using the reference to the new object. 2. Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and setting the desired temperature. The folowing methods provide these behaviors: turnon and turnoff, which accept no arguments and return no value, and setTemp, which accepts an int argument and returns no value. Assume there is a reference variable officeAC of type AirConditioner. Create a new object of type AirConditioner and save the reference in officeAC. After that, use the reference to turn on the new air conditioner object and set the desired termperature to 69 degrees
Computers and Technology
1 answer:
Dafna11 [192]3 years ago
6 0

Answer:

1)

officeAC = new AirConditioner();

officeAC.turnOn();

2)

officeAC = new AirConditioner();

officeAC.turnOn();

officeAC.setTemp(69);  

Explanation:

1)

In the first statement a new object of the class AirConditioner whose reference is assigned to the officeAC. new is a keyword which creates an object of the class.

Next statement uses the method turnOn(). Reference to the new object officeAC is used to invoke this method turnOn().

2) The first two statements works the same as in 1)

The last statement invokes a method setTemp() using the reference variable and passes the value 69 to this method to set the desired temperature.

You might be interested in
चार फरक छुट्याउनुहोस् ।) 3. Write down any four provisions of cyber ethic साइबर नैतिकताका कुनै चार प्रावधानहरु लेख्नुहोस् ।​
Kruka [31]

Answer:

Five provisions of cyber ethics are:

Your computer or system should not be used to harm others. Your cyber knowledge should not be used to steal other people's resources. One should not use or copy softwares for which you have not paid. ... Never use other people's resources without their consent.

7 0
3 years ago
The computer that has been traditionally found on the desks in many offices and homes is the ___ computer.
Sladkaya [172]

Answer:

<u> Personal</u> computer

Explanation:

I.d.k the answer so don't blame me if its incorrect

7 0
3 years ago
Which function returns the rank of a value within a dataset, assigning an average rank for tied values
ANTONII [103]
Z-y bcuz it is a function and u need to revail rate
4 0
3 years ago
Could you help be advanced in tech?
Amiraneli [1.4K]
Yes I can help you if you go to google or bing type In the question you have and click enter you will get the answer

P.S if it doesn't try to type it more clear
6 0
3 years ago
A device on a power drill that enables a user to back out a drill bit that is stuck in the work material is called a(n) ________
andrew11 [14]
<h2>Answer:</h2><h3>Reversing switch</h3><h2 /><h2>Explanation:</h2><h3>A device on a power drill that enables a user to back out a drill bit that is stuck in the work material is called a(n) <u>Reversing switch</u>.</h3>

A power drill is a electrical component that is used to drill or fast screw tightening and it maybe cordless or with cord. So, when the power drill is used to make hole then by using reverse switch it can be back out by rotating in opposite direction.

  • It is a simple switch operated electrically.
  • It used to reverse the direction in which current is flowing.
  • Reversing switch has four terminals.
  • These terminals can be connected in such a way that when the switch is triggered then the direction or current is reversed and so the rotation of the motor of the power drill is also reversed.

<h3>I hope it will help you!</h3>
8 0
3 years ago
Other questions:
  • What is the difference between deta security and privecy ?
    12·2 answers
  • If the polar bear were taken out of the food chain what would happen to the seal population
    10·1 answer
  • To paste text with the same formatting as the document in which it is entered, select _____ from the Paste menu.
    12·1 answer
  • The decimal system was invented by the ____ empire.
    14·1 answer
  • Your friend Rebecca called because she is working on a budget and needs help with the AutoSum feature. She thinks AutoSum will b
    8·1 answer
  • A network administrator was testing an IPS device by releasing multiple packets into the network. The administrator examined the
    13·2 answers
  • Mga halimbawa ng migrasyon​
    13·1 answer
  • Will give brainliest
    8·1 answer
  • Analyzing the role of elements in audio editing and Video
    7·1 answer
  • A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, d
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!