II. Exercise 2: Write a ThreeWayLamp class that models the behavior of a lamp that uses a three-way bulb. These bulbs ha
Posted: Sat Feb 19, 2022 3:23 pm
II. Exercise 2: Write a ThreeWayLamp class that models the behavior of a lamp that uses a three-way bulb. These bulbs have four possible states: off, low light, medium light, and high light. Each time the switch is activated, the bulb goes to the next state (from high, the next state is off, from off to low etc). The Three WayLamp class has a single method called Switch() which takes a single int parameter a indicating how many times the switch is activated. The Switch() method should simply print out a message indicating the state of the bulb after the last activation. I