-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovie.h
49 lines (37 loc) · 1.15 KB
/
Movie.h
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
#ifndef _MOVIE_H_
#define _MOVIE_H_
//#include "lib/set.h"
//#include "lib/map.h"
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <vector>
using std::map;
using std::set;
using std::queue;
using std::vector;
using namespace std;
//MapItem <keyType, valueType>
class Movie {
public:
Movie (std::string title); // constructor for a movie with the given title
Movie (const Movie & other); // copy constructor
~Movie (); // destructor
std::string getTitle () const; // returns the title of the movie
void addKeyword (std::string keyword);
/* Adds the (free-form) keyword to this movie.
If the exact same keyword (up to capitalization) was already
associated with the movie, then the keyword is not added again. */
void addActor (std::string actor);
set<std::string> getAllKeywords () const;
/* Returns a set of all keywords associated with the movie. */
vector<std::string>* getAllActors () const;
private:
std::string _title;
set<std::string> keywords;
vector<string>* actors;
// you get to decide what goes here
};
#endif