Question: I need help making a CircuitTester in java for the following code, needing an actual and expected states :public class Circuit { private int firstSwitchState

I need help making a CircuitTester in java for the following code, needing an actual and expected states :public class Circuit { private int firstSwitchState = 0; private int secondSwitchState = 0; private int lampState = 0; // 0 for down and 1 for up public int getFirstSwitchState() { return firstSwitchState; } public int getSecondSwitchState() { return secondSwitchState; } // 0 for off and 1 for on public int getLampState() { return lampState; } public void toggleFirstSwitch() { firstSwitchState = -1 * firstSwitchState + 1; toggleLampState(); } public void toggleSecondSwitch() { secondSwitchState = -1 * secondSwitchState + 1; toggleLampState(); } private void toggleLampState() { lampState = -1 * lampState + 1; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!