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

45 lines
725 B
D
Raw Normal View History

2022-11-15 13:51:22 +00:00
module command.remote.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);
}
}