-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfacade.hpp
More file actions
36 lines (32 loc) · 854 Bytes
/
facade.hpp
File metadata and controls
36 lines (32 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FACADE_HPP
#define FACADE_HPP
class Band {
private:
GuitarPlayer _GuitarPlayer;
Drummer _Drummer;
BassPlayer _BassPlayer;
void PlayVerse(int nVerse);
void PlayChorus();
void PlaySolo();
public:
Band(const char *guitarPlayerName, const char *drummerName,
const char *bassPlayerName) : _GuitarPlayer(guitarPlayerName),
_Drummer(drummerName), _BassPlayer(bassPlayerName) { }
~Band() { }
void PlaySong();
};
class Musician {
protected:
string _Name;
public:
virtual ~Musician() { }
};
class GuitarPlayer: public Musician {
public:
GuitarPlayer(const char *name) { _Name = name; }
~GuitarPlayer() override { }
void PlayVerseRiff(int nVerse);
void PlayChorusRiff();
void PlaySolo();
};
#endif // FACADE_HPP