Question: Change the public interface of the circuit class of Exercise E3.4 so that it has the following methods: Provide an implementation using only language
Change the public interface of the circuit class of Exercise •• E3.4 so that it has the following methods:

Provide an implementation using only language features that have been introduced.
The challenge is to find a data representation from which to recover the switch states.
public int getSwitchState (int switchNum) public int getLampState() public void toggleSwitch (int switchNum)
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
It looks like youre being asked to modify the public interface of a circuit class to include three methods 1 getSwitchStateint switchNum which should ... View full answer
Get step-by-step solutions from verified subject matter experts
