This repository has been archived on 2022-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
patterns/command/remote/garagedoor.d

39 lines
597 B
D

module command.remote.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");
}
}