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/remoteundostatusmacro/stereo.d

45 lines
740 B
D
Raw Normal View History

2022-11-15 20:25:25 +00:00
module command.remoteundostatusmacro.stereo;
import std.stdio : writeln;
import std.conv : to;
class Stereo
{
string location;
this(string location)
{
this.location = location;
}
void on()
{
writeln(location ~ " stereo is on");
}
void off()
{
writeln(location ~ " stereo is off");
}
void setCD()
{
writeln(location ~ " stereo is set for CD input");
}
void setDVD()
{
writeln(location ~ " stereo is set for DVD input");
}
void setRadio()
{
writeln(location ~ " stereo is set for Radio");
}
void setVolume(int volume)
{
writeln(location ~ " stereo volume set to " ~ volume.to!string);
}
}