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

Class Bulb

CommandDesignPattern/WithoutCommandDesignPattern/Bulb.java:3–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1package BehaviouralDesignPatterns.CommandDesignPattern.WithoutCommandDesignPattern;
2
3public class Bulb {
4 boolean isOn;
5
6 public void turnOnBulb(){
7 isOn = true;
8 System.out.println("Bulb is ON now");
9 }
10
11 public void turnOffBulb(){
12 isOn = false;
13 System.out.println("Bulb is OFF now");
14 }
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected