Question: You will create a basic java program to implement LightBulb class that represents color light bulb. Different objects (instances) of LightBulb represents different color of

You will create a basic java program to implement LightBulb class that represents color light bulb. Different objects (instances) of LightBulb represents different color of light. Ensure to use package name in the project. Implement few methods on it like switchOn, switchOff, getStatus, getColor switchOn method changes the status of the light bulb as switched on switchOff method changes the status of the light bulb as switched off getStatus method is used to get the current status indicating whether the bulb is ON or OFF. Represent ON by returning TRUE and Represent OFF by returning FALSE Initialize the bulb status with turned OFF i.e. right after a new Object of LightBulb class is created, getStatus should return OFF. getColor method returns the color of the light bulb

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!