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

1. Create a constructor definition that has two parameters, a manufacturer’s brand and a screen size. These parameters will brin

g in information. 2. Inside the constructor, assign the values taken in from the parameters to the corresponding fields. 3. Initialize the powerOn field to false (power is off), the volume to 20, and the channel to 2. 4. Write comments describing the purpose of the constructor above the method header. 5. Compile and debug. Do not run. Task #3 Methods 1. Define accessor methods called getVolume, getChannel, getManufacturer, and getScreenSize that return the value of the corresponding field. 2. Define a mutator method called setChannel accepts a value to be stored in the channel field. 3. Define a mutator method called power that changes the state from true to false or from false to true. This can be accomplished by using the NOT operator (!). If the boolean variable powerOn is true, then !powerOn is false and vice versa. Use the assignment statement powerOn = !powerOn; to change the state of powerOn and then store it back into powerOn (remember assignment statements evaluate the right hand side first, then assign the result to the left hand side variable. 4. Define two mutator methods to change the volume. One method should be called increaseVolume and will increase the volume by 1. The other method should be called decreaseVolume and will decrease the volume by 1. 5. Write javadoc comments above each method header. 6. Compile and debug. Do not run.
Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
3 0

Answer:

C++.

Explanation:

#include <iostream>

#include <string>

using namespace std;

////////////////////////////////////////////////////////////

class Television {

   string brand;

   float screen_size;

   bool powerOn;

   int volume;

   int channel;

   

public:

   // Comments

   Television(string brand, int screen_size) {

       this->brand = brand;

       this->screen_size = screen_size;

       powerOn = false;

       volume = 20;

       channel = 2;

   }

   //////////////////////////////////////////

   // Comments

   int getVolume() {

       return volume;

   }

   

   // Comments

   int getChannel() {

       return channel;

   }

   

   // Comments

   string getManufacturer() {

       return brand;

   }

   

   // Comments

   float getScreenSize() {

       screen_size;

   }

   ///////////////////////////////////////////

   // Comments

   void setChannel(int channel) {

       this->channel = channel;

   }

   

   // Comments

   void power() {

       if (!powerOn)

           powerOn = !powerOn;

   }

   

   // Comments

   void increaseVolume() {

       volume = volume + 1;

   }

   

   // Comments

   void decreseVolume() {

       volume = volume - 1;

   }

};

You might be interested in
A family member who hasn’t worked with computers before has decided to change jobs. You’ve been asked to explain some of the bas
Olin [163]

Answer: That due to the specific tasks that needs to be accomplished by each program to make an all encompassing program would be inefficient and full  of bugs

Explanation: try to do something along those lines ex why would MySQL be used to check your essay for grammar  the tasks are on opposite spectrums

8 0
3 years ago
What are the groups located within developer tab? check all that apply.
deff fn [24]

Answer:

controls, code, protect, and add-ins!

Explanation:

edge 2021

6 0
3 years ago
In the insert table of figures dialog box which drop down menu do you use to choose what information is displayed in the table
Mashutka [201]

Answer:

caption label

Explanation:

8 0
3 years ago
Can somebody show me
OLEGan [10]
So you are gonna read that whole paragraph and then answer the question or describe what you learned about
7 0
3 years ago
Question # 2
CaHeK987 [17]

Answer:

ZeroDivisionError

ValuError

Explanation: Edg 2020-2021

6 0
3 years ago
Other questions:
  • Your ipad has an application that will not stop running. what feature/tool can you use to stop it? kill treason task manager for
    6·2 answers
  • Which command will display each line in the text file based on the alphabet?
    10·1 answer
  • You want the user to enter the length, width, and height from the keyboard. Which cin statement is correctly written?
    10·1 answer
  • A user contacted the help desk to report that the laser printer in his department is wrinkling the paper when printed. The user
    5·1 answer
  • Name the three basic storage device of a computer​
    6·2 answers
  • Suppose you are developing a data visualization application DataViz which calls some functions from a statistics library class S
    5·1 answer
  • If you forget your privacy password what will you do if the ask this question what is the name of one of your teacher?​
    12·1 answer
  • The _______ within a story are the people and/or objects that the story is about
    5·2 answers
  • PLS ANSWER ASAP!!!! <br><br> In three to five sentences, explain the function of utilities.
    13·1 answer
  • List seven media features that can be used in media queries.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!