subject
Engineering, 28.02.2020 23:30 Leanylopez0811

Lab ObjectivesBe able to declare a new classBe able to write a constructorBe able to write instance methods that return a valueBe able to instantiate an objectBe able to use calls to instance methods to access a change the state of an is familiar with a television. It is the object we are going to create in this lab. First we need a blueprint. All manufacturers have the same basic elements in the televisions they produce as well as many options. We are going to work with a few basic elements that are common to all televisions. Think about a television in general. It has a brand name (i. e. it is made by a specific manufacturer). The television screen has a specific size. It has some basic controls. There is a control to turn the power on and off. There is a control to change the channel. There is also a control for the volume. At any point in time, the television’s state can be described by how these controls are set. We will write the Television class. Each object that is created from the Television class must be able to hold information about that instance of aTelevision in fields. So a Television object will have the following attributes:< >. The manufacturer attribute will hold the brand name. This cannot change once the television is created, so will be a named constant.< >. The screenSize attribute will hold the size of the television screen.< >. The powerOn attribute will hold the value true if the power is on and false if the power is off.< >. The channel attribute will hold the value of the station that the television is showing.< >. The volume attribute will hold a number value representing the loudness (0 being no sound).The Television object will also be able to control the state of its attributes. These controls become methods in our class.< >. The setChannel method will store the desired station in the channel field.< >. The power method will toggle the power between on and off, changing the value stored in the powerOn field from true to false or from false to true.< >. The increaseVolume method will increase the value stored in the volume field by 1.< >. The decreaseVolume method will decrease the value stored in the volume field by 1.< >. The getChannel method will return the value stored in the channel field.< >. The getVolume method will return the value stored in the volume field.< >. The getManufacturer method will return the constant value stored in the MANUFACTURER field.• getScreenSize. The getScreenSize method will return the constant value stored in the SCREEN_SIZE field. We will also need a constructor method that will be used to create an instance of aTelevision.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 18:20
Most leaks in reciprocating air compressors can be detected and minimized by: (clo4) a)-detecting leakage areas using ultrasonic acoustic detector. b)-tightening joints and connections c)-replacing faulty equipment d)-all of the given options
Answers: 2
You know the right answer?
Lab ObjectivesBe able to declare a new classBe able to write a constructorBe able to write instance...
Questions
question
Mathematics, 12.12.2019 12:31
question
History, 12.12.2019 12:31
question
Health, 12.12.2019 12:31
Questions on the website: 13722363