patterns/command/remoteundostatus/garagedoor.d

39 lines
607 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
module command.remoteundostatus.garagedoor;
import std.stdio : writeln;
class GarageDoor
{
private string location;
this(string location)
{
this.location = location;
}
void up()
{
writeln(location ~ " garage Door is Up");
}
void down()
{
writeln(location ~ " garage Door is Down");
}
void stop()
{
writeln(location ~ " garage Door is Stopped");
}
void lightOn()
{
writeln(location ~ " garage light is on");
}
void lightOff()
{
writeln(location ~ " garage light is off");
}
}