class MAIN creation make feature {NONE} -- Creation make (args : ARRAY [STRING]) is local pSIS: STANDARD_INPUT_STREAM; pBS: BINARY_INPUT_STREAM; testLight:Light; testLightOnCmd:LightOnCommand; testLightOffCmd:LightOffCommand; testFan:Fan; testFanOnCmd:FanOnCommand; testFanOffCmd:FanOffCommand; testSwitch:Switch; do -- create a test switch !!testSwitch; -- create a test light and the corresponding on- and off-commands !!testLight; !!testLightOnCmd.make(testLight); !!testLightOffCmd.make(testLight); -- connect light to switch and test the switch print("Connecting Switch to Light...%N"); testSwitch.setCommands(testLightOnCmd, testLightOffCmd); testSwitch.flipUp; testSwitch.flipDown; -- create a test fan and the corresponding on- and off-commands !!testFan; !!testFanOnCmd.make(testFan); !!testFanOffCmd.make(testFan); -- connect fan to switch and test the switch print("%NConnecting Switch to Fan...%N"); testSwitch.setCommands(testFanOnCmd, testFanOffCmd); testSwitch.flipUp; testSwitch.flipDown; !!pSIS.make; !!pBS.make(pSIS); pBS.read_character; end -- make end -- class MAIN