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
For every decision you make, there is a trade-off. Please select the best answer from the choices provided T F
Dimas [21]
This is true, for every decision you make there is a trade-off.

7 0
3 years ago
Read 2 more answers
You have a chart that shows 100 data points and you've circled the highest value. Which of the following are you using?
cricket20 [7]

The Rudolph Rule states that  simple ways you can make information stand out and guide or satisfy your audience to important details and highlight important  information in your presentation

so i conclude option D is correct for above statement

hope it helps

5 0
3 years ago
Read 2 more answers
Describe FIVE significant advantages of web-based applications for an organisation.
masya89 [10]

Answer

There are a lot of advantages of web based applications.

Explanation:

Below are the advantages:

  1. Web based applications can be accessed from device that is connected to the device.
  2. No physical software required to download, install, update or manage which saves a lot of administration work for large companies.
  3. Web based software is compatible with any device or platform. The software is delivered through a browser of the users' choice.
  4. Mobile device applications allow for access to the software when out of the office.
  5. Direct access to latest information for Employees where every they are located.

Apart from these, there are lot more benefits, like quick and easy updates, centralized data where data is secure and easy to backup.  We can reach anybody, anywhere in the world.

Business costs are drastically reduced by spending less time talking to customers over the phone.

Online training can be finished at user's own time and risk.

It's available 24 hours a day, 7 days a week

The software is always up-to-date

8 0
2 years ago
Write a program that creates a dictionary containing the U.S. states as keys and their abbreviations as values. The program shou
AleksandrR [38]

Answer:

Explanation:

The following program is written in Python. It creates a loop that keeps creating a random number to randomly choose a State abbreviation from the dictionary. Then it asks the user what the state is. If the user gets the answer correct it prints out "Correct" and adds 1 point to the correct variables. Otherwise it prints "Incorrect" and adds 1 point to the incorrect variable. Finally, printing out the final amount of correct and incorrect responses. The program was tested and the output can be seen below.

import random

states = {"AL":"Alabama","AK":"Alaska","AZ":"Arizona","AR":"Arkansas","CA":"California","CO":"Colorado","CT":"Connecticut","DE":"Delaware","FL":"Florida","GA":"Georgia","HI":"Hawaii","ID":"Idaho","IL":"Illinois","IN":"Indiana","IA":"Iowa","KS":"Kansas","KY":"Kentucky","LA":"Louisiana","ME":"Maine","MD":"Maryland","MA":"Massachusetts","MI":"Michigan","MN":"Minnesota","MS":"Mississippi","MO":"Missouri","MT":"Montana","NE":"Nebraska","NV":"Nevada","NH":"New Hampshire","NJ":"New Jersey","NM":"New Mexico","NY":"New York","NC":"North Carolina","ND":"North Dakota","OH":"Ohio","OK":"Oklahoma","OR":"Oregon","PA":"Pennsylvania","RI":"Rhode Island","SC":"South Carolina","SD":"South Dakota","TN":"Tennessee","TX":"Texas","UT":"Utah","VT":"Vermont","VA":"Virginia","WA":"Washington","WV":"West Virginia","WI":"Wisconsin","WY":"Wyoming"}

keys_list = list(states)

correct = 0

incorrect = 0

while True:

   randNum = random.randint(0, 49)

   abbr = keys_list[randNum]

   answer = input("Enter The State name of " + abbr + ": ")

   if answer.lower() == states[abbr].lower():

       print("Correct")

       correct += 1

   else:

       print("Incorrect")

       incorrect += 1

   again = input("Play again? y/n ")

   if again.lower() == 'n':

       break

print("Correct: " + str(correct))

print("Incorrect: " + str(incorrect))

6 0
2 years ago
Which teamwork characteristic motivates your team members to perform better?
scoundrel [369]
Maybe Encouragement? I don't know, are there any choices to choose from?
4 0
2 years ago
Read 2 more answers
Other questions:
  • What term is used to describe a function that uses an algorithm to convert an input of letters and numbers into an encrypted out
    9·1 answer
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • The icons to insert footnotes and endnotes in a document are located in the _____ tab.
    8·1 answer
  • _________ is critical to Amazon's success.<br><br> SCM<br><br> JIT<br><br> ERP<br><br> VMI
    9·1 answer
  • When a JSP page is compiled, what is it turned into?
    11·1 answer
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • What icon is usually used to indicate an attachment feature?
    14·2 answers
  • Adam has designed and tested an Android app for a startup. The client expects to get quick responses to the app. After consultin
    7·1 answer
  • 2. Why do old video games have large pixels and images with jagged edges?
    6·1 answer
  • A company is looking for an employee to design and test connections in its
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!