-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovie.cpp
64 lines (51 loc) · 988 Bytes
/
Movie.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
#include "stdafx.h"
#include "Movie.h"
Movie::Movie()
{
}
Movie::Movie(string name, int year, string category, string rating, int ranking) {
this->name = name;
this->year = year;
this->category = category;
this->rating = rating;
this->ranking = ranking;
}
Movie::~Movie()
{
}
bool Movie::operator==(Movie * movie)
{
return this->name == movie->getName() && this->year == movie->getYear();
}
bool Movie::operator!=(Movie * movie)
{
return !(this->name == movie->getName() && this->year == movie->getYear());
}
string Movie::getName()
{
return this->name;
}
string Movie::getRating()
{
return this->rating;
}
string Movie::getCategory()
{
return this->category;
}
void Movie::edit(string name, int year, string category, string rating, int ranking)
{
this->name = name;
this->year = year;
this->category = category;
this->rating = rating;
this->ranking = ranking;
}
int Movie::getYear()
{
return this->year;
}
int Movie::getRanking()
{
return this->ranking;
}