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
What enables image processing, speech recognition, and complex game play in artificial intelligence?
Paraphin [41]

Deep Learning enables image processing, speech recognition, and complex game play in artificial intelligence.

<h3>What is Deep learning?</h3>

This is known to be a part of machine learning, and it is seen as  neural network that is made up of three or more layers which tries to simulate the behavior of the human brain.

Note that Deep Learning enables image processing, speech recognition, and complex game play in artificial intelligence.

See options below

1)Expert Systems

2)Deep Learning

3)Natural Language Understanding (NLU)

4)Artificial General Intelligence (AGI)

Learn more about Deep Learning from

brainly.com/question/27844272

#SPJ1

5 0
2 years ago
You need a version of usb technology that will support older usb devices, of which you have many, as well as newer ones. what wo
tiny-mole [99]
The answer you're looking for might be "backwards-compatible".
7 0
3 years ago
Linda is a core member of a project. She estimates the cost of the project, creates project requirements, and notes risks. What
lord [1]

Explanation:

no linda is the core member not rhe project

4 0
3 years ago
What procedures are involved in saving a file for the first time
ratelena [41]
You must name the file and you must also choose where the file will be saved.

3 0
3 years ago
The best way for employees to improve their skills online is to enroll in a digital
Maksim231197 [3]

The best way for employees to improve their skills online is to enroll in a digital office.

office.

<u>Explanation:</u>

In the present innovation-driven world, upskilling is turning out to be progressively significant just in light of the fact that innovation changes so quick.

A key preferred position for workers in web-based learning is that representatives can finish their preparation voluntarily and as indicated by their own timetables.

Enrolling in a digital office would allow an individual to learn at their ease, pace and comfort. It will definitely help the individual to expand and acquire skills.

So now full-time workers or the individuals who essentially don't have the opportunity to return to college full-time have a lot of chances to discover low maintenance courses.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • How do the search methods differ for primary and secondary data?
    10·2 answers
  • According to the video, what education and experience do employers look for in Reporters and Correspondents? Check all that appl
    10·2 answers
  • How many much memory is in one megabyte ?
    9·1 answer
  • Write a program that uses these bounds and bisection search (for more info check out the Wikipedia page on bisection search) to
    8·1 answer
  • In ____________________ testing, security personnel simulate or perform specific and controlled attacks to compromise or disrupt
    10·1 answer
  • Which of the following operation is not performed by a mouse 1) left click , middle click , right click, double click​
    15·2 answers
  • I love my baby boy and can someone help me with this
    6·1 answer
  • Search the Web for three different employee hiring and termination policies. Review each and look carefully for inconsistencies.
    5·1 answer
  • How do you save a document in a format so that any reader can view it?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!