patterns/command/remoteundostatus/stereo.d

45 lines
735 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
module command.remoteundostatus.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);
}
}