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

Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and checki

ng if the air conditioner is on or off. The following methods provide this behavior: turnOn and turnOff , setTemp , and isOn , which accepts no argument and returns a boolean indicating whether the air conditioner is on or off. Assume there is a reference variable myAC to an object of this class, which has already been created. There is also a boolean variable status , which has already been declared. Use the reference variable, to invoke a method to find out whether the air conditioner is on and store the result in status .
Computers and Technology
1 answer:
vaieri [72.5K]3 years ago
8 0

Answer:

yes?

Explanation:

You might be interested in
How many of devices you identified inside the control room need to magnetism to operate
Nady [450]
The answer is 3 devices
5 0
3 years ago
Read 2 more answers
Create a program that calculates three options for an appropriate tip to leave after a meal at a restaurant.
max2010maxim [7]

Complete Question:

Python Programming: Create a program that calculates three options for an appropriate tip to leave after a meal at a restaurant and repeats if the user enters "y" or "Y" to continue.

Print the name of the application "Tip Calculator"

- Get input from the user for "Cost of meal: "

- Calculate and display the "Tip Amount" and "Total Amount" at a tip_percent of 15%, 20%, and 25%.

- Use a FOR loop to iterate through the tip_percent

- The formula for calculating the tip amount is: tip = cost of meal * (tip percent / 100)

- The program should accept decimal entries like 52.31. Assume the user will enter valid data.

- The program should round the results to a maximum of two decimal places . At the "Continue? (y/n)" prompt, the program should continue only if the user enters “y” or “Y” to continue.

- Print "Bye!" or a salutation at the end of the program

Answer:

Answered in Python

print("Tip Calculator")

tryagain = "y"

while tryagain == "y" or tryagain == "Y":

    amount = float(input("Cost of Meal: "))

    for tip_percent in range(15,26,5):

         print(str(tip_percent)+"%")

         print("Tip Amount: "+str(round(tip_percent * amount/100,2)))

         print("Total Amount: "+str(round(amount + (tip_percent * amount/100),2)))

    tryagain = input("Continue?y/n: ")

print("Bye!")

Explanation:

This prints the name of the calculator

print("Tip Calculator")

This initializes tryagain to yes

tryagain = "y"

While tryagain is yes, the following loop is repeated

while tryagain == "y" or tryagain == "Y":

This prompts user for amount of meal

    amount = float(input("Cost of Meal: "))

This gets the tip_percent which is 15%, 20% and 25% respectively

    for tip_percent in range(15,26,5):

This prints the tip_percent

         print(str(tip_percent)+"%")

This calculates and prints the tip amount rounded to 2 decimal places

         print("Tip Amount: "+str(round(tip_percent * amount/100,2)))

This calculates and prints the total amount rounded to 2 decimal places

         print("Total Amount: "+str(round(amount + (tip_percent * amount/100),2)))

This prompts user to continue or not

    tryagain = input("Continue?y/n: ")

The program ends here

print("Bye!")

7 0
3 years ago
what are some steps Hector could have taken to ensure that his photographs were not ruined near the end of the shoot?
galben [10]

Answer:

make several extra copies of the pictures and frame them right away if they're printed out.

Explanation:

3 0
2 years ago
When an employee is told that his job will be outsourced within a year, he knows that his job will become unnecessary
Anvisha [2.4K]
False!! Hope this helps
8 0
3 years ago
Write a program with a function that accepts a string as an argument and returns the number of uppercase, lowercase, vowel, cons
diamong [38]

Answer:

Explanation:

The following code is written in Python. It is a function called checkString that takes in a string as an argument and loops through each char in that string and checking to see if it is lowercase, uppercase, vowel, consonant, or punctuations. It adds 1 to the correct variable. At the end of the loop it prints out all of the variables. The picture below shows a test output with the string "Brainly, Question."

def checkString(word):

   uppercase = 0

   lowercase = 0

   vowel = 0

   consonants = 0

   punctuation = 0

   vowelArray = ['a', 'e', 'i', 'o','u', 'y' ]

   consonantArray = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z']

   punctuationArray = ['.', '!', '?', ',', ';', '(', ')']

   for char in word:

       if char.isupper():

           uppercase += 1

       else:

           lowercase += 1

       if char.lower() in vowelArray:

           vowel += 1

       elif char.lower() in consonantArray:

           consonants += 1

       if char in punctuationArray:

           punctuation += 1

   print('Uppercase: ' + str(uppercase))

   print('Lowercase: ' + str(lowercase))

   print('Vowels: ' + str(vowel))

   print('Consonants: ' + str(consonants))

   print('Punctuations: ' + str(punctuation))

8 0
3 years ago
Other questions:
  • Which are types of lines? Choose three answers.
    9·1 answer
  • in c++, what happends when i add 1 to the RAND_MAX then take rand() deivded by (RAND_MAX+1)?if my purpose is to take out a rando
    11·1 answer
  • Most licensing agencies offer an orientation meeting for applicants who want to obtain licensing for a child care facility or a
    12·2 answers
  • What types of input and output devices would be ideal for a college student completing his or her coursework?
    8·1 answer
  • Where are options to add a border around the outside of a chart found?
    9·2 answers
  • Abby wants to simply share a snapshot of her calendar with another user. Which option should she choose to achieve
    15·1 answer
  • Why RAM is necessary in a computer​
    9·1 answer
  • Given the following class: Create a class MyGenerator that can be used in the below main method.
    8·1 answer
  • Pleasee telllllllllllllllllll​
    15·1 answer
  • Question is attached as image, please help :>
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!