- Ii Exercise 2 Write A Threewaylamp Class That Models The Behavior Of A Lamp That Uses A Three Way Bulb These Bulbs Ha 1 (121.61 KiB) Viewed 54 times
II. Exercise 2: Write a ThreeWayLamp class that models the behavior of a lamp that uses a three-way bulb. These bulbs ha
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
II. Exercise 2: Write a ThreeWayLamp class that models the behavior of a lamp that uses a three-way bulb. These bulbs ha
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