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
svp [43]
3 years ago
10

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

g the desired temperature. The following methods provide this behavior: turnOn and turnOff, and setTemp, which accepts an int argument and returns no value. Assume there is a reference variable myAC to an object of this class, which has already been created. Use the reference variable, to invoke a method that tells the object to set the air conditioner to 72 degrees.
Computers and Technology
1 answer:
Illusion [34]3 years ago
6 0

Answer:

public class AirConditioner {

   boolean turnOnOff;

   int temp;

//The Constructor

   public AirConditioner(boolean turnOnOff, int temp) {

       this.turnOnOff = turnOnOff;

       this.temp = temp;

   }

//Method to turnOn AC

   public void turnOn(){

       this.turnOnOff = true;

   }

//Method to turnOff AC

   public void turnOff(){

       this.turnOnOff = false;

   }

////Method to set Temperature

   public void setTemp(int newTemp){

       this.temp = newTemp;

   }

}

Explanation:

A test class where an object of the class is created is given below

class AirconditionerTest{

   public static void main(String[] args) {

//Creating the class reference        

AirConditioner myAc = new AirConditioner(true,72);

//Calling methods in the class      

myAc.turnOn();

 myAc.setTemp(72);

   }

}

You might be interested in
A(n) _____ might be written by a programmer or it might be created through a DBMS utility program.
valkas [14]

Answer:

The correct answer to the following question will be "Application program".

Explanation:

  • Applications include database programs, word processors, browsers, development tools, picture editors, and platforms for communication.
  • It use the OS (Operating System) of the computer and many other assisting programs, frequently system software, to work.
  • An application program is a detailed, body-contained program that directly works a given function for just the user.

There are some examples of application programs such as:

  • Includes various bundled software.
  • Addresses an organization's data management and application requirements, covering all divisions.
  • It allows users can create and manage information.
  • Used primarily to get content access without editing.

6 0
3 years ago
Does anyone know the answers to the AR test on Gathering Blue by Lois Lowery?
Ede4ka [16]

yes i do....................................................

6 0
3 years ago
Write a recursive function that returns 1 if an array of size n is in sorted order and 0 otherwise. Note: If array a stores 3, 6
galina1969 [7]

Answer:

The function in C++ is as follows:

int isSorted(int ar[], int n){

if (n == 1 || n == 0){

 return 1;}

if (ar[n - 1] < ar[n - 2]){

 return 0;}

return isSorted(ar, n - 1);}

Explanation:

This defines the function

int isSorted(int ar[], int n){

This represents the base case; n = 1 or 0 will return 1 (i.e. the array is sorted)

if (n == 1 || n == 0){

 return 1;}

This checks if the current element is less than the previous array element; If yes, the array is not sorted

if (ar[n - 1] < ar[n - 2]){

 return 0;}

This calls the function, recursively

return isSorted(ar, n - 1);

}

6 0
3 years ago
Find the mean median mode and range of the data set <br> 11, 13,11,12 10 ,12,11,8
denpristay [2]

Answer:

Mean: 11

Mode: 11

Median: 11

Explanation:

7 0
3 years ago
Which type of app is the best choice when it is critical to be able to use the device's features but performance is not critical
lisov135 [29]

Answer:

Hybrid.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are; planning, analysis, design, development (coding), testing, implementation and execution, and maintenance.

Some of the models used in the software development life cycle (SDLC) are;

I. A waterfall model: it can be defined as a process which involves sequentially breaking the software development into linear phases. Thus, the development phase takes a downward flow like a waterfall and as such each phase must be completed before starting another without any overlap in the process.

II. An incremental model: it refers to the process in which the requirements or criteria of the software development is divided into many standalone modules until the program is completed.

III. A spiral model: it can be defined as an evolutionary SDLC that is risk-driven in nature and typically comprises of both an iterative and a waterfall model. Spiral model of SDLC consist of these phases; planning, risk analysis, engineering and evaluation.

Basically, softwares are categorized into three (3) main categories based on the development platform and these are;

a. Web application.

b. Native application.

c. Hybrid application.

A hybrid application is a type of software application that is designed based on the combination of the elements of both web applications and native applications.

Typically, a hybrid application is a web application that is developed in a native application shell, using a standardized web programming language such as CSS, JavaScript, and HTML.

Generally, a hybrid application avails a programmer the opportunity to write a code for a mobile application once while accommodating or being compatible with multiple app platforms such as Android, Windows, iOS, etc.

Hence, a hybrid application is the best choice of an application when it's critical for the end users to be able to use the features associated with a device such as a mobile phone but performance isn't critical.

4 0
4 years ago
Other questions:
  • What will happen if you change data that is used in a formula
    10·1 answer
  • ____, developed by xuejia lai and james massey, is a block cipher that operates on 64-bit blocks of plaintext.
    10·1 answer
  • A popular use of cd-rw and cd-r discs is to create audio cds. what is the process of copying audio and/or video data from a purc
    11·1 answer
  • Jeffrey works with a huge database of spreadsheet records each day. To organize and identify these spreadsheets, he wants to ass
    7·2 answers
  • Why is it important to begin development of a software solution with a programming design in place? A programming design summari
    11·2 answers
  • Digital signatures are as legally acceptable as written signatures.
    12·1 answer
  • To specify your preferred colors, fonts, and effects for a document, which of the following should be done?
    5·2 answers
  • While developing a network application, a programmer adds functionally that allows her to access the running program without aut
    14·1 answer
  • You can use tables for layout work. However, in XHTML, each form control should have its own ______ element
    12·1 answer
  • What is the simplest form of backing up data?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!