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
solong [7]
3 years ago
8

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

following methods are provided for these behaviors: turn_on and turn_off. Both methods accept no arguments and return no value. There is a reference variable office_a_c of type AirConditioner. Create a new object of type AirConditioner using the office_a_c reference variable. After that, turn the air conditioner on using the reference to the new object.
Computers and Technology
1 answer:
Sunny_sXe [5.5K]3 years ago
8 0

Answer:

The code is given in the explanation section

Explanation:

//Class Airconditioner

public class AirConditioner {

   private boolean turnOnOff;

//The Constructor

   public AirConditioner(boolean turnOnOff) {

       this.turnOnOff = turnOnOff;

   }

//method turn_on

   public void turn_on(){

       this.turnOnOff = true;

   }

//method turn_off

   public void turn_off( ){

       this.turnOnOff = false;

   }

}

// A new class to test the airconditional class

class AircondionTest{

   public static void main(String[] args) {

//Creating an object of the Aircondional class

       AirConditioner office_a_c = new AirConditioner(false);

//Using the reference varible to call method turn_on      

office_a_c.turn_on();

   }

}

You might be interested in
A(n) ______ is an output device that visually conveys text, graphics, and video information.
polet [3.4K]
The answer is Printer. hope this helped :)

3 0
3 years ago
(a) Draw a flow chart to a program that will have a servo arm move based on an input from a distance sensor. The sensor values w
Sveta_85 [38]

Answer:

c

Explanation:

got it right

6 0
3 years ago
Which line of code could be used for a constructor?
uysha [10]

Explanation:

I think (first name last name id Num)

4 0
3 years ago
Can someone help me with this 1 writing question?!! please!
Romashka-Z-Leto [24]
If the topic of what you will be writing is covered by the site produced by a reputable university, then you may use it as long as you include it in your paper for copyright purposes, like in your bibliography or footnotes in any case. Since the site is made from a "reputable" university and I emphasis the word in quoted marks, that it is legit and proven to be valid because a famous university will not try anything to squander their reputation, hence the issue of whether it is true or not has less doubt than any other site with no credentials. 

So, yes. You may use that option as long as the content is what you've been looking for. 
4 0
3 years ago
Read 2 more answers
When entering a function or formula in a cell, which of the first character you must type?
lions [1.4K]
When entering a function or formula in a cell, which of the first character you must type =
3 0
4 years ago
Read 2 more answers
Other questions:
  • A vehicle travels 2345 m in 315 toward the evening sun. What is its velocity
    13·1 answer
  • Which feature of a browser will you select to block pop-ups? view help tools file
    15·2 answers
  • What is an effective way to assess user requests for additional features and functions
    10·1 answer
  • According to Fourman, Informatics is _______________ with a very _____________ scope.
    5·2 answers
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • What is HTML. What is HTML ​
    15·2 answers
  • Select all the correct answers.
    14·2 answers
  • If you'd like to queue multiple exports and keep working on a different project in Premiere Pro, what method should you use?
    5·1 answer
  • Consider the following static method.
    9·1 answer
  • Which call of the function correctly follows the instructions laid out in the api?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!