-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStereo.hpp
More file actions
21 lines (18 loc) · 670 Bytes
/
Stereo.hpp
File metadata and controls
21 lines (18 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef STEREO_H
#define STEREO_H
#include <iostream>
#include <string>
#include <string_view>
class Stereo {
public:
Stereo(std::string_view l) : location(l) { }
void on() { std::cout << location << " stereo is On\n"; }
void off() { std::cout << location << " stereo is Off\n"; }
void setCD() { std::cout << location << " stereo is set for CD input\n"; }
void setDVD() { std::cout << location << " stereo is set for DVD input\n"; }
void setRadio() { std::cout << location << " stereo is Radio\n"; }
void setVolume(int volume) { std::cout << location << " stereo volume is set to " << volume << '\n'; }
private:
std::string location;
};
#endif /* STEREO_H */