MCPcopy Create free account
hub / github.com/Anchals24/Low-Level-Design / Main

Class Main

CommandDesignPattern/WithoutCommandDesignPattern/Main.java:5–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3//client is handling all of this.
4
5public class Main {
6 public static void main(String[] args) {
7 AirConditioner ac = new AirConditioner();
8 ac.turnOnAc();
9 ac.setTemperature(30);
10 ac.turnOffAc();
11
12 Bulb b1 = new Bulb();
13 b1.turnOnBulb();
14 b1.turnOffBulb();
15 }
16}
17
18//There are multiple problems with this kind of implementation.
19// Now, at this moment. turn on ac -> simple, 100 methods runs -> AC turn on.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected