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
Logical design is tied to a specific hardware and software platform. a. True b. False
cluponka [151]

Answer:B false

Explanation:

3 0
2 years ago
You can put a small level on your camera to help keep the horizons straight? TRUE OR FALSE
anastassius [24]
The answer is true and i believe it is best to put it at the 4 intersecting points<span />
5 0
3 years ago
Read 2 more answers
Put these operating systems in order according to the date they were released. (The first to be released would be
uysha [10]
1. ms-dos 1981
2. windows 2.0 1987
3. windows xp 2001
4. mac os 2001
5. windows 7 2009
8 0
3 years ago
In which of these areas can software engineers specialize?
Elza [17]

Answer:

as me I choose managing user programs.

Explanation:

4 0
3 years ago
If you posted an advertisement for your research study on marriage on the Internet and the couples who responded (i.e., the coup
WITCHER [35]

Answer:

B. volunteer bias.

Explanation:

-Experimenter bias is when the expectations of the experimenter in regards to the outcome are communicated to the participants in any form.

-Volunteer bias refers to a situation in which the people that volunteer to take place in a study doesn't represent the general public.

-Research bias is when the experimenter influence the result to get a specific outcome.

-Social desirability bias is when the people taking part in a study give their responses in a way that is viewed as favorable.

According to this, the answer is that the situation would be an example of volunteer bias.

3 0
2 years ago
Other questions:
  • Jason wants to open a program with the command prompt window. Which command should he type in the Run dialog box to open the com
    10·1 answer
  • #TODO: Define a data structure to keep track of which links are part of / not part of the spanning tree.
    14·1 answer
  • which of the following is involved in ordering an outline. A.grouping B.merging C.organizing D.arranging
    10·1 answer
  • Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the S
    6·1 answer
  • Which of these engine components forms a tight seal between the piston and the cylinder and is necessary for proper engine opera
    13·2 answers
  • function calculate () { var s = 2; var x = 2; var y = 3; if (x &gt; 4) { s=s+ 2; } else if ( y &gt; 4) { s=s+ 4; } else { s+=3;}
    11·1 answer
  • Which data type is also called a binary object?
    9·2 answers
  • There are several design goals in building an operating system; for example, resource utilization, timeliness, robustness and so
    11·1 answer
  • In terms of technology, wich of the four devices is the most recent?
    7·1 answer
  • Write a Python program (rainfall.py) to collect data and calculate the average rainfall over a period of years. The program shou
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!