Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SimpleRemoteControlTest{
- public static void main(String args[]){
- SimpleRemoteControl remote = new SimpleRemoteControl();
- Light light = new Light();
- LightOnCommand lightOn = new LightOnCommand(light); //pass the receiver to command
- remote.setCommand(lightOn); //set command to the slot
- remote.buttonWasPressed(); // simulate button press
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement