patterns/command/remoteundostatusmacro/tv.d

31 lines
473 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
module command.remoteundostatusmacro.tv;
import std.stdio : writeln;
class TV
{
private string location;
private int channel;
this(string location)
{
this.location = location;
}
void on()
{
writeln(location ~ " TV is on");
}
void off()
{
writeln(location ~ " TV is off");
}
void setInputChannel()
{
this.channel = 3;
writeln(location ~ " TV channel is set for DVD");
}
}