-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSong.cpp
More file actions
41 lines (33 loc) · 763 Bytes
/
Song.cpp
File metadata and controls
41 lines (33 loc) · 763 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
37
38
39
40
41
#include "Song.h"
Song::Song(std::string songName, std::string songerName, std::string ganre, std::string album, int year , float rating)
{
this->songName = songName;
this->songerName = songerName;
this->ganre = ganre;
this->album = album;
this->year = year;
this->rating = rating;
}
std::string Song::getSongName() const
{
return songName;
}
std::string Song::getSongerName() const
{
return songerName;
}
std::string Song::getGanre() const
{
return ganre;
}
float Song::getRating()const {
return rating;
}
void Song::updateRating()
{
rating++;
}
void Song::print() const
{
std::cout << songName << " " << songerName << " " << ganre << " " << album << " " << year << " " << rating << std::endl;
}