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]
4 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]4 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
Bluetooth 5 allows data to be transferred between two devices at a rate of
Minchanka [31]

Answer:

2 MBPS.

Explanation:

The Bluetooth 5 raises the data transmission of information throughput from 1 Mbps to the 2 Mbps. The main advantage of Bluetooth 5 do not increasing the energy  utilization.The Bluetooth 5 increasing the volume of information that technologies can be distribute.

  • The main advantage of Bluetooth 5 decreases the time it would take to send and receive the signals,
  • The previous version of Bluetooth transmit the information from one device to the another with the 1 Mbps speed  .
7 0
4 years ago
Which is the correct APA format in books?​
Nina [5.8K]

Answer:

It includes the author's last name, the year, and  a page number. In the reference list, start with the author's last name and initials, followed by the year. The book title is written in sentence case

4 0
3 years ago
Read 2 more answers
The range A2:B4 has how many cells?   A. 2   B. 4   C. 6   D. 8
olya-2409 [2.1K]
The answer to that is D.
3 0
3 years ago
Read 2 more answers
Everyone should try to be an NFL quarterback because they earn so much money. True or False
In-s [12.5K]
No. It is statistically unlikely to even make it into the NFL. Pursuing this is not the best idea.
6 0
4 years ago
Read 2 more answers
Create a text file named employee.dat containing the following data: b. Write a C++ program to read the employee.dat file create
Paul [167]

Answer:

1000 500 250 125 the output

Explanation:

write a program using integers userNum and x as input,  userNum divided by

x four times.  EX : If  the input is 2000 2 the output is 1000 500 250 125

8 0
3 years ago
Other questions:
  • ​Case-Based Critical Thinking Questions​Case 9-1Melissa, a computer science engineering student, is learning the basics of progr
    11·1 answer
  • CHALLENGE ACTIVITY 2.15.1: Reading and outputting strings. Write a program that reads a person's first and last names, separated
    11·1 answer
  • Dueto working at home, lack of interaction may result in ___________ professionalgrowth.
    14·1 answer
  • Which option marks all modification made within a document? Review Comment Track Changes Balloons
    15·2 answers
  • Gina is upgrading your computer with a new processor. She installs the processor into your motherboard and adds the cooling syst
    13·2 answers
  • TOPIC-PYTHON
    8·2 answers
  • Draw the resistor’s voltage and current phasors at t=15ms. Draw the vectors with their tails at the origin. The orientation of y
    5·2 answers
  • PHP server scripts are surrounded by delimiters, which? *
    5·1 answer
  • Give five example of secondary storage device, stating their function and storage capacity​
    6·1 answer
  • How do hand tools,Farm implements and farm equipment differ from one another
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!