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
Reading a news release about a product is an example of <br> research.
Oduvanchick [21]

Answer:

Yes, it is true, because it informs you

Explanation:

5 0
3 years ago
Enzo formed a study group for an upcoming geography test. To start off each session, they go over past notes and look at maps. T
lesya692 [45]

<u>Answer:</u>

My suggestions are given below:

<em>Method 1:</em> Can create series of questions from book-inside and take an open-book test. Open-book test method is one of the best way to learn

<em>Method 2:</em> Written test is always necessary to really understand how much they remember the concept

<em>Method 3:</em> Participate in online quiz related to the learning outcome given in the question

<em>Method 4: </em>Answer questions from the reference books

<em>Method 5:</em> Go to library or review online books for further study.

8 0
3 years ago
Yall tryna play gta later? I play on ps4
iVinArrow [24]

Answer:

xbox tho

Explanation:

8 0
2 years ago
Read 2 more answers
What is the range for copper tape
jeyben [28]

Answer:

I like the song "Angel"

3 0
3 years ago
What is the correct keyboard shortcut to cut a cell value
vladimir2022 [97]

Answer:

Cntrl+X

Explanation:

Do it on your computer

4 0
2 years ago
Other questions:
  • Which option is referred to by the Animals tag?
    5·1 answer
  • Climate is considered a(n) _______ limiting factor. (2 points)
    9·1 answer
  • Rate is how fast a screen updates the information being displayed.
    6·2 answers
  • You can toggle between different types of references by pressing the ____ key on your keyboard.
    15·1 answer
  • Computer virus is a<br> a. software<br> b. hardware<br> c. bacteria<br> d. none of these
    13·1 answer
  • Gear systems with __________ can have both drive and driven gears on the same shaft. a. an odd number of gears b. an even number
    6·1 answer
  • Splunk knows where to break the event, where the time stamp is located and how to automatically create field value pairs using t
    7·1 answer
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • Lily obtained data from five trails 50 kcal 72 kcal 12 kcal and 50 kcal which best decribes her data
    11·1 answer
  • If consumers start to believe they need a product, what is likely to happen
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!