Question: In Java. Thanks! Create a class Light that has the following Two instance variables i.isOn true or false the light is on ii.bulbWattage an integer
In Java. Thanks!
Create a class Light that has the following
Two instance variables
i.isOn true or false the light is on
ii.bulbWattage an integer value corresponding to the number of watts in the bulb
Two constructors
i.Default set the instance variables to a default value
ii.One that takes in two parameters that will set the instance variables
Accessors and Mutators for both variables
A method turnOnLight that sets the value isOn to true
A method turnOffLight that sets the value of isOn to false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
