File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
BridgePattern/src/io/csie/chris
CompositePattern/src/io/csie/chris Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,9 @@ public static void main(String args[]) {
1313 AppleRemoteControl myRemoteControl = new AppleRemoteControl (myTV );
1414
1515 myRemoteControl .setChannelPad (200 );
16+
17+ myRemoteControl .turnOn ();
18+
19+ myRemoteControl .turnOff ();
1620 }
1721}
Original file line number Diff line number Diff line change @@ -22,5 +22,18 @@ public static void main(String args[]) {
2222 mainMenu .add (luncuMenu );
2323
2424 mainMenu .print ();
25+
26+
27+ CompositeMenu dinnerMenu = new CompositeMenu ();
28+
29+ dinnerMenu .add (new Item ("8 pond beef" , 200 ));
30+
31+ CompositeMenu dailyMenu = new CompositeMenu ();
32+
33+ dailyMenu .add (mainMenu );
34+ dailyMenu .add (dinnerMenu );
35+
36+ dailyMenu .print ();
37+
2538 }
2639}
You can’t perform that action at this time.
0 commit comments