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
Tomtit [17]
3 years ago
9

python There is a reference variable office_a_c of type AirConditioner. Create a new object of type AirConditioner using the off

ice_a_c reference variable. After that, turn the air conditioner on using the reference to the new object.
Computers and Technology
1 answer:
Kay [80]3 years ago
8 0

Answer:

  1. class AirConditioner:
  2.  def __init__(self, a_c=False):
  3.    self.office_a_c = a_c  
  4. ac = AirConditioner()
  5. ac.office_a_c = True

Explanation:

Firstly, create a class and name it as AirConditioner (Line 1).

Next in the class constructor, create the reference variable office_a_c (Line 3). Please note the reference variable shall be preceded with a self keyword. Besides, the reference variable is set to False by default.

Create an AirConditioner object (Line 6) and then use the dot syntax (.) to set the object reference variable office_a_c to True.

You might be interested in
What are storage devices ​
devlian [24]

Answer:

<em>=</em><em>></em><em>. </em><em>storage</em><em> </em><em>devices</em><em> </em><em>are</em><em> </em><em>those</em><em> </em><em>devices</em><em> </em><em>that </em><em>is </em><em> </em><em>used </em><em>to </em><em>store</em><em> </em><em>some </em><em>data </em><em>in </em><em>it </em>

<em>It </em><em>is </em><em>very </em><em>important</em><em> </em><em>device</em><em> </em><em>that </em><em>gives </em><em>a </em><em>lot </em><em>of </em><em>benefits</em><em> </em><em>in </em><em>our </em><em>daily</em><em> lives</em>

<em>we </em><em>can </em><em>also </em><em>carry</em><em> </em><em>our </em><em>data </em><em>from </em><em>one </em><em>place</em><em> to</em><em> </em><em>another</em>

6 0
2 years ago
Read 2 more answers
If Anime Characters were real , Who Would Your Anime Wife Would Be (Tell Who And Why)
ehidna [41]

Answer:

Runa, because  she’s like me I r l lol

Explanation:

3 0
2 years ago
give an example of a technical issue you were not able to resolve on your first attempt. What troubleshooting steps did you take
erastovalidia [21]
One technical issue I had was on Windows 8.1, with the charm menu not working. The troubleshooting steps to fix it was I did CTRL+SHIFT+ESC to open task manager. I then found Windows Explorer and clicked "Reload." Then everything was fine.

Hope This Helped!
6 0
3 years ago
Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, s
Afina-wow [57]

The code is implemented based on the given operations.

Explanation:

#include <iostream>

#include <string>

using namespace std;

class dayType

{ private:

 string day[7];

 string presentDay;

 int numofDays;

public:

 void setDay(string freshDay);

 void printDay() const;

 int showDay(int &day);

 int nextDay(int day);

 int prevDay(int day) const;

 int calcDay(int day, int numofDays);    

 dayType()

 {

  day[0] = "Sunday";

  day[1] = "Monday";

  day[2] = "Tuesday";

  day[3] = "Wednesday";

  day[4] = "Thursday";

  day[5] = "Friday";

  day[6] = "Saturday";

  presentDay = day[0];

  numofDays = 0;

 };

 ~dayType();

};

#endif

#include "dayType.h"

void dayType::setDay(string freshDay)

{

  presentDay = freshDay;

}

void dayType::printDay()

{

  cout << "Day chosen is " << presentDay << endl;

}

int dayType::showDay(int& day)

{

  return day;

}

int dayType::nextDay(int day)

{

day = day++;

if (day > 6)

 day = day % 7;

switch (day)

{

case 0: cout << "The successive day is Sunday";

 break;

case 1: cout << "The successive day is Monday";

 break;

case 2: cout << "The successive day is Tuesday";

 break;

case 3: cout << "The successive day is Wednesday";

 break;

case 4: cout << "The successive day is Thursday";

 break;

case 5: cout << "The successive day is Friday";

 break;

case 6: cout << "The successive day is Saturday";

 break;

}

cout << endl;

return day;

}

 

int dayType::prevDay(int day)

{

day = day--;

switch (day)

{

case -1: cout << "The before day is Saturday.";

 break;

case 0: cout << "The before day is Saturday.";

 break;

case 1: cout << "The before day is Saturday.";

 break;

case 2: cout << "The before day is Saturday.";

 break;

case 3: cout << "The before day is Saturday.";

 break;

case 4: cout << "The before day is Saturday.";

 break;

case 5: cout << "The before day is Saturday.";

 break;

default: cout << "The before day is Saturday.";

}

cout << endl;

return day;

}

int dayType::calcDay(int addDays, int numofDays)

{

addDay = addDays + numofDays;

if (addDay > 6)

 addDay = addDay % 7;

switch(addDay)

{

case 0: cout << "The processed day is Sunday.";

 break;

case 1: cout << "The processedday is Monday.";

 break;

case 2: cout << "The processedday is Tuesday.";

 break;

case 3: cout << "The processedday is Wednesday.";

 break;

case 4: cout << "The processedday is Thursday.";

 break;

case 5: cout << "The processedday is Friday.";

 break;

case 6: cout << "The processedday is Saturday.";

 break;

default: cout << "Not valid choice.";

}

cout << endl;

return addDays;

}

4 0
3 years ago
Evolution of management​
Alex Ar [27]

Answer:

Evolution of Management and Evolution of Management Science. ... Evolution of the management thought is a process that began in the earlier days of humans. It began when the man found the need to live in the groups. Then, mighty men soon organized the masses and distributed them among the groups.

Explanation:

HOPE IT HELPS

6 0
2 years ago
Read 2 more answers
Other questions:
  • When creating an input control (for example, a button) on a form the _____________ indicates the data that is contained in the n
    13·1 answer
  • 10.
    13·1 answer
  • True or false over the course of ecological succession,species diversity increases over time?
    12·2 answers
  • The logical view of a database system refers tohow a user or programmer conceptually organizes and understands the data. how the
    5·1 answer
  • what is a massive online storage that allows for Access by any internet-connected device running web browser. use for Less priva
    6·1 answer
  • Sequential codes may be used to represent complex items or events involving two or more pieces of related data.
    7·1 answer
  • What is the difference between digital art and digital design?
    8·1 answer
  • Write a Java program that prompts the user for an int n. You can assume that 1 ≤ n ≤ 9. Your program should use embedded for loo
    5·1 answer
  • Which of the following is not true about variables
    8·1 answer
  • What java syntax allows me to take user input.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!