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

Suppose there is a class AirConditioner. The class supports the following behaviors: turning the air conditioner on and off. The

following methods are provided for these behaviors: turn_on and turn_off. Both methods accept no arguments and return no value. There is a reference variable office_a_c of type AirConditioner. Create a new object of type AirConditioner using the office_a_c reference variable. After that, turn the air conditioner on using the reference to the new object.
Computers and Technology
1 answer:
Sunny_sXe [5.5K]3 years ago
8 0

Answer:

The code is given in the explanation section

Explanation:

//Class Airconditioner

public class AirConditioner {

   private boolean turnOnOff;

//The Constructor

   public AirConditioner(boolean turnOnOff) {

       this.turnOnOff = turnOnOff;

   }

//method turn_on

   public void turn_on(){

       this.turnOnOff = true;

   }

//method turn_off

   public void turn_off( ){

       this.turnOnOff = false;

   }

}

// A new class to test the airconditional class

class AircondionTest{

   public static void main(String[] args) {

//Creating an object of the Aircondional class

       AirConditioner office_a_c = new AirConditioner(false);

//Using the reference varible to call method turn_on      

office_a_c.turn_on();

   }

}

You might be interested in
‘Bottom of the pyramid’ innovation refers to ancient Egyptian approaches to new product development – true or false?
ruslelena [56]
<span>False. The bottom of the pyramid innovation or 'BoP' innovation refers to people who lives at the bottom of the society generally are hard to adept to new technologies and innovations. However, in recent years, 'BoP' innovation has been proven to have a huge market</span>
5 0
3 years ago
Compared with other PC operating systems, the Linux-based operating systems:
eduard

The PC operating systems are operating systems that run on personal computers

<em>The Linux-based operating system are (a) free or very inexpensive</em>

Several operating systems run on PC; the most popular are <em>Windows, Linux and, macOS</em>.

  • The Windows operating system costs between $100 and $250, for a genuine copy
  • The macOs costs between $69 and $115, for a genuine copy

However, the Linux operating system is free, and it is also open source.

Hence, in comparison to the other PC operating systems, the Linux based operating system is <em>free or very inexpensive</em>

Read more about operating systems at:

brainly.com/question/2126669

7 0
2 years ago
Which of the following statements is false? a. InputStream and OutputStream are abstract classes for performing byte-based I/O.
Bond [772]

Answer:

The answer is "Option b".

Explanation:

Tubes were streams among processes, that are interconnected. It is coordinated ways to communicate between threads, that's why the only option b is wrong, and the correct choice can be defined as follows:

  • In option a, the byte-based I/O the input and output stream abstract class is used, that's why it correct.
  • In option c, It is used to provide additional functionality, that's why it correct.  
  • In option d, It is used to provide the text output.
7 0
3 years ago
A(n) monitoring vulnerability scanner is one that listens in on the network and determines vulnerable versions of both server an
Tom [10]

Answer: Passive

Explanation: Passive scanning is the process that scans the possibility of the risk that can arise while data is received starting port to the destination. It does the scanning between the server and the client software to define vulnerability .

It cannot work in those network which don't persist the traffic.No false data that is present in the application is detected by it if the data is unclear.

5 0
3 years ago
Character positions in<br> arrays start counting with<br> the number 1.<br> True<br> False
d1i1m1o1n [39]

Answer:

False.

Explanation:

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.

This ultimately implies that, a data dictionary found in a computer database system typically contains the records about all the data elements (objects) such as data relationships with other elements, ownership, type, size, primary keys etc. This records are stored and communicated to other data when required or needed.

In Computer programming, an array can be defined as data structure which comprises of a fixed-size collection of variables each typically holding a piece of data and belonging to the same data type such as strings or integers.

This ultimately implies that, when a programmer wishes to store a group of related data (elements) of the same type, he or she should use an array.

Generally, character positions in arrays start counting with the number 0 not 1.

Hence, an array uses a zero-based indexing and as such the numbering or position of the characters (elements) starts from number 0. Thus, the first character (element) in an array occupies position zero (0), the second number one (1), the third number two (2) and so on.

6 0
3 years ago
Other questions:
  • Monetary Policy can be either Expansionary or Contractionary. Which of the following actions classify as Expansionary Monetary P
    7·2 answers
  • For your new sporting goods store, you originally planned to only sell Nike shoes. Therefore, you only had enough shoe displays
    11·2 answers
  • The ____________ mechanism consists of a lever arm attached to the mousetrap spring.
    15·1 answer
  • Can a spreadsheet be filtered only by one column at a time?
    11·1 answer
  • Describe markings on a road that indicate that it is safe to pass.
    10·1 answer
  • What is the behavior of an element with static positioning in regard to the page layout?
    12·1 answer
  • What creative commons license allow for the work to be copied, distributed, displayed, or performed but modifications may not be
    13·1 answer
  • What is a field on a table
    13·1 answer
  • You have been supporting CSM Tech Publishing's Windows Server 2016 server network for over a year. The office has two Windows Se
    12·1 answer
  • Chantal has configured the network at her company's new headquarters with a number of VLANs. All devices joined to the individua
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!