Flip Flop Class
[email protected] // 1.0 // type-checkable
Create a class named FlipFlop
representing a switch which is initially off.
It should have a method named flip
that takes no other arguments and only inverts the state of the switch.
When the switch is off, flip
should turn it on, and vice versa.
FlipFlop
should also have a method named is_on
that returns whether the switch is currently on.