-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdvd.cpp
80 lines (47 loc) · 1.36 KB
/
dvd.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
#include <string>
#include <iostream>
//#include "LibraryItem.h"
#include "dvd.h"
using namespace std;
Dvd::Dvd() {
}
void Dvd::SetTitle(string title) {
this->title = title;
}
void Dvd::SetCat(string cat) {
this->cat = cat;
}
void Dvd::SetRunTime(int runTime) {
this->runTime = runTime;
}
void Dvd::SetStudio(string studio) {
this->studio = studio;
}
void Dvd::SetReleaseDate(string releaseDate) {
this->releaseDate = releaseDate;
}
string Dvd::GetTitle() {
return title;
}
string Dvd::GetCat() {
return cat;
}
int Dvd::GetRunTime() {
return runTime;
}
string Dvd::GetStudio() {
return studio;
}
string Dvd::GetReleaseDate() {
return releaseDate;
}
void Dvd::PrintInfo() {
cout << " DVD ID #: " << GetId() << " , Cost: $" << GetCost() << " , Max Loan Period: " << GetLoanPeriod() << " , Status: " << GetStatus();
cout << " , Title: " << GetTitle() << " , Studio: " << GetStudio() << " , Category: " << GetCat() << " , Run Time: " << GetRunTime() << " , Release Date: " << GetReleaseDate() << endl << endl;
}
void Dvd::PrintRawInfo() {
int t = 3;
ofstream out("items.dat", std::ios_base::app);
out << t << endl << GetId() << endl << GetCost() << endl << GetLoanPeriod() << endl << GetStatus() << endl;
out << GetTitle() << endl << GetStudio() << endl << GetCat() << endl << GetRunTime() << endl << GetReleaseDate() << endl;
}