-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudio.cpp
82 lines (47 loc) · 1.39 KB
/
audio.cpp
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include <string>
#include <iostream>
//#include "LibraryItem.h"
#include "audio.h"
using namespace std;
void Audio::SetArtist(string artist) {
this->artist = artist;
}
void Audio::SetTitle(string title) {
this->title = title;
}
void Audio::SetTracks(int tracks) {
this->tracks = tracks;
}
void Audio::SetReleaseDate(string releaseDate) {
this->releaseDate = releaseDate;
}
void Audio::SetGenre(string genre) {
this->genre = genre;
}
string Audio::GetArtist() {
return artist;
}
string Audio::GetTitle() {
return title;
}
int Audio::GetTracks() {
return tracks;
}
string Audio::GetReleaseDate() {
return releaseDate;
}
string Audio::GetGenre() {
return genre;
}
Audio::Audio() {
}
void Audio::PrintInfo() {
cout << " CD ID #: " << GetId() << " , Cost: $" << GetCost() << " , Max Loan Period: " << GetLoanPeriod() << " , Status: " << GetStatus();
cout << " , Title: " << GetTitle() << " , Artist: " << GetArtist() << " , Genre: " << GetGenre() << " , Tracks: " << GetTracks() << " , Release Date: " << GetReleaseDate() << endl << endl;
}
void Audio::PrintRawInfo() {
int t = 2;
ofstream out("items.dat", std::ios_base::app);
out << t << endl << GetId() << endl << GetCost() << endl << GetLoanPeriod() << endl << GetStatus() << endl;
out << GetTitle() << endl << GetArtist() << endl << GetGenre() << endl << GetTracks() << endl << GetReleaseDate() << endl;
}