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]
2 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]2 years ago
8 0

Answer:

yes?

Explanation:

You might be interested in
Here's something to stop you from getting repetitive when writing essays. Write a program that reads multiple lines of plain tex
Marianna [84]

Answer:

The output is attached below

Explanation:

d = {}

while True:

line = input("Enter line: ")

if len(line)==0:

break

token = line.split(' ')

for var in token:

try:

if len(var)==0:

continue

count = d[var]

d[var] = count + 1

except KeyError:

d[var] = 1

pass

for word in sorted(d):

print(word , d[word])

------------------

7 0
3 years ago
What is the basic purpose of Google calendar?
goldenfox [79]
The basic purpose of a google calendar is basically the same as a regular calendar. it is used to keep track life's important events all in one place.    
7 0
3 years ago
Read 2 more answers
This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balance
aksik [14]

Answer:

import java.util.Scanner;

public class TeamRoster {

  public static void main(String[] args) {

     Scanner scan = new Scanner(System.in);

     int[][] players = new int[5][2];

     boolean keepAlive = true;

     char input;

     

     for (int i = 0; i < 5; i++) {

        System.out.println("Enter player " + (i+1) + "'s jersey number: ");

        players[i][0] = scan.nextInt();

        if( players[i][0] >= 0 && players[i][0] < 100 ) {

             System.out.println("Enter player number less than 100");

               System.out.println("Enter player " + (i+1) + "'s rating: ");

               players[i][1] = scan.nextInt();

               if ( players[i][1] >= 1 && players[i][1] <10 ) {

                     System.out.println();

               }    else {

                     System.out.println("Enter player " + (i+1) + "'s rating: ");

                     players[i][1] = scan.nextInt();

               }

     }

     }

     System.out.println();

     outputRoster(players, 0);

     

     while (keepAlive) {

        outputMenu();

        input = scan.next().charAt(0);

        if (input == 'q') {

           keepAlive = false;

           break;

        } else if (input == 'o') {

           outputRoster(players, 0);

        } else if (input == 'u') {

           System.out.println("Enter a jersey number: ");

           int jerseyNum = scan.nextInt();

           System.out.println("Enter a new rating for the player: ");

           int newRating = scan.nextInt();

           for (int l = 0; l < 5; l++) {

              if (players[l][0] == jerseyNum) {

                 players[l][1] = newRating;

              }

           }

        } else if (input == 'a') {

           System.out.println("Enter a rating: ");

           int rating = scan.nextInt();

           outputRoster(players, rating);

        } else if (input == 'r') {

           System.out.println("Enter a jersey number: ");

           int jerseyNum = scan.nextInt();

           boolean exists = true;

           for (int l = 0; l < 5; l++) {

              if (players[l][0] == jerseyNum) {

                 System.out.println("Enter a new jersey number: ");

                 players[l][0] = scan.nextInt();

                 System.out.println("Enter a rating for the new player: ");

                 players[l][1] = scan.nextInt();

              }

           }

           

        }

     }

     

     return;

  }

   

  public static void outputRoster(int[][] players, int min) {

     System.out.println(((min>0) ? ("ABOVE " + min) : ("ROSTER")));

     int item = 1;

     for (int[] player : players) {

        if (player[1] > min) {

           System.out.println("Player " + item + " -- Jersey number: " + player[0] + ", Rating: " + player[1]);

        }

        item++;

     }

     System.out.println();

  }

   

  public static void outputMenu() {

     System.out.println("MENU");

     System.out.println("u - Update player rating");

     System.out.println("a - Output players above a rating");

     System.out.println("r - Replace player");

     System.out.println("o - Output roster");

     System.out.println("q - Quit\n");

     System.out.println("Choose an option: ");  

  }

}

Explanation:

The program is written in Java.

It is a bit straightforward.

The Scanner module is declared and used to collect input from the user.

The program prompts the user for each player jersey then rating.

All five players details are collected.

The program shows the output of all the entries.

5 0
3 years ago
Add (total) all the number in the list (below) using a for loop, but skip over the number at index 3.
user100 [1]

Answer:

The program in Python is as follows:

numbers = [10,20,30,40,50,60,100]

total = 0

for i in range(len(numbers)):

   if i != 3:

       total+=numbers[i]

print(total)

Explanation:

This initializes the list

numbers = [10,20,30,40,50,60,100]

Set total to 0

total = 0

This iterates through numbers

for i in range(len(numbers)):

This ensures that the index 3, are not added

<em>    if i != 3:</em>

<em>        total+=numbers[i]</em>

Print the calculated sum

print(total)

3 0
2 years ago
Computer spreadsheet is a grid of​
Kruka [31]
Huh we’re, we’re is the computer screen shot
3 0
2 years ago
Other questions:
  • what properties are associated with all Microsoft Office files and include author, title, and subject
    5·1 answer
  • A computer is made of up 6 main components: a) CPU (central processing unit)
    7·1 answer
  • Complete the function void update (int *a, int *b), which reads two integers as argument, and sets a with the sum of them, and b
    8·1 answer
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • Visual culture is an area of academic study that deals with the totality of images and visual objects produced in ____________,
    6·1 answer
  • . How is using 0 / 1 or true / false in specifying digital an abstraction?
    11·1 answer
  • Write a function called prod_all that takes any number of arguments and returns their sum. Test the function by using these two
    10·1 answer
  • The Binder Prime Company wants to recognize the employee who sold the most of its products during a specified period. Write a qu
    12·1 answer
  • Need answer ASAP!!!!
    14·1 answer
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!