Write a ThreeWayLamp class that models the behavior of a lamp that uses a three-way bulb.These bulbs have actually four possible states: off, low light, medium light, and high light. Each tim the...

Write a ThreeWayLamp class that models the behavior of a lamp that uses a three-way bulb.These bulbs have actually four possible states: off, low light, medium light, and high light. Each tim the switch is activated, the bulb goes to the next state (from high, the next state is off, from off to low etc). The ThreeWayLamp class has a single method called switch() which takes a single int parameter indicating how many times the switch is activated. (you need to throw an exception if its negative). The switch() method should simply print out a message indicating the state of the bulb after it has changed Only in c++ language

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here