Question: We will write the Television class. Each object that is created from the Television clas Television in fields. So a Television object will have the
We will write the Television class. Each object that is created from the Television clas Television in fields. So a Television object will have the following attributes: s must be able to hold information about that instance of a manufacturer. The manufacturer attribute will hold the brand name. This cannot change once the television is created, so will be a named constant screensize. The screenSize attribute will hold the size of the television screen This cannot change once the television has been created so will be a named constant. PowerOn. The poweron attribute will hold the value true if the power is on and false if the power is off. . channel. The channel attribute will hold the value of the station that the television is showing , volume. The volume attribute will hold a number value representing the loudness (0 being no sound) These attributes become fields in our class The Television object will also be able to control the state of its attributes. These controls become methods in our class. . setChannel. The setChannel method will store the desired station in the channel field
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
