-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSeason.cpp
More file actions
78 lines (69 loc) · 1.45 KB
/
Copy pathSeason.cpp
File metadata and controls
78 lines (69 loc) · 1.45 KB
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
/*
* Streaming Service Modeling Proyect
* Rommel T.
*/
/*
* Definition of Season class
*/
#include "Season.h"
/**
* Constructor for the Season class.
* @param string id: the ID of the season
* string title: the title of the season
* @return Season object
*/
Season::Season(string id, string title){
setId(id);
setTitle(title);
}
/**
* Sets the ID of the season.
* @param string id_: the ID of the season
* @return
*/
void Season::setId(string id_){
id = "SSN" + id_;
}
/**
* Retrieves the ID of the season.
* @param
* @return string: the ID of the season
*/
string Season::getId(){
return id;
}
/**
* Sets the title of the season.
* @param string title: the title of the season
* @return
*/
void Season::setTitle(string title){
this->title = title;
}
/**
* Retrieves the title of the season.
* @param
* @return string: the title of the season
*/
string Season::getTitle(){
return title;
}
/**
* Sets the episode information for the season.
* @param string id: the ID of the episode
* string name: the name of the episode
* int length: the length of the episode
* int rating: the rating of the episode
* @return
*/
void Season::setEpisode(string id, string name, int length, int rating){
episodes.push_back(new Episode(id,name,length,rating));
}
/**
* Retrieves the episodes of the season.
* @param
* @return vector<Episode*>: the episodes of the season
*/
vector<Episode*> Season::getEpisodes(){
return episodes;
}