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
maxonik [38]
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 this behavior: turnOn and turnOff. Both methods take no arguments and return no value.
Assume there is a reference variable myAC to an object of this class, which has already been created. Using the reference variable, invoke a method to tell the air conditioner object to turn on.
Computers and Technology
1 answer:
AleksandrR [38]3 years ago
5 0

Answer:

Hi!

I will use JAVA to answer the question.

The class AirConditioner could be:

public class AirConditioner {

  bolean state;

  AirConditioner(){ <em>//constructor</em>

     this.state = false;

   }

public void turnOff{ <em>//turn off method</em>

 this.state = false;

   }

public void turnOn{ <em>//turn on method</em>

 this.state = true;

   }

}

Program to solve the problem:

public static void main(){ <em>//main program</em>

  AirConditioner myAC = new AirConditioner();  <em>//instanciate the AirConditioner object</em>

  myAC.turnOn(); <em>//call the method turnOn for myAC instance.</em>

}

You might be interested in
How can I master networking my home/business computer(s) - Tv's - iot devices and make the whole system as secure as possible?
vagabundo [1.1K]

Answer:

you can take guide from

hope this will help you....!

5 0
2 years ago
What is meant by polling mode in communication between software andUART and what is its disadvantage as compared to interrupt mo
g100num [7]

Answer and Explanation:

POLLING MODE: In polling mode in communication process the processor     continually check UART port for data instead of UART port signaling the process through an interrupt when data is ready as is done in interrupt mode.

 THE DISADVANTAGES AS COMPARED TO THE INTERRUPT MODE :

the disadvantages in polling mode is that the processor wastes time in checking the UART continually while in interrupt mode it is  doing useful task

until the UART interrupt this  

3 0
3 years ago
Suppose x and y are int variables and ch is a char variable. Consider the following input: 5 28 36 What value (if any) is assign
eimsori [14]

Answer:

x is assigned "5", y is assigned "28", and ch is assigned "$"

Explanation:

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   int x,y;

   char ch;

   x = 5;

   y = 28;

   ch = 36;

   cout<<x<<endl<<y<<endl;

   cout<<ch;

   return 0;

}

4 0
3 years ago
A technician is troubleshooting a Windows system in which an application works properly when the computer is booted in Safe Mode
sweet-ann [11.9K]

Answer:

yoooo nba BAD BAD

Explanation:

3 0
3 years ago
What is the best Describe an integer data type
kolbaska11 [484]

Answer:

It is a data type that only holds whole numbers, a.k.a. integers.

what is the picture about?

3 0
3 years ago
Other questions:
  • Write a program that displays the following pattern: ..\.\* .\.\*** \.\***** ******* \.\***** .\.\*** ..\.\* That is, seven line
    8·1 answer
  • Which of the following illustrates the proper declaration of a variable and data type to hold a whole number?
    13·1 answer
  • Bullets in a text box will do which of the following?
    9·2 answers
  • Siva added a "Contact Form" to her website.
    10·1 answer
  • What is a sign of the brick and mortar and the virtual world meeting together?
    14·1 answer
  • You are a database administrator. Chantelle comes to you asking for help on how to access all the data in one row of the databas
    11·1 answer
  • What is the code for forgot password on messenger​
    9·1 answer
  • Read the attached paper titled A Survey of Coarse-Grained Reconfigurable Architecture and comment on it. Make sure to specifical
    5·1 answer
  • What would provide structured content that would indicate what the code is describing ?
    6·1 answer
  • Task 2
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!