-
Notifications
You must be signed in to change notification settings - Fork 0
/
Movie.h
51 lines (35 loc) · 1.22 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
49
50
51
#ifndef MOVIE_H
#define MOVIE_H
//#include "lib/set.h"
//#include <set>
#include "lib/set.h"
#include <string>
class Movie {
public:
Movie();
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. */
const Set<std::string> & getAllKeywords () const;
/* Returns a set of all keywords associated with the movie. */
void addActor(std::string actor);
const Set<std::string> & getAllActors () const;
void setCost(double num);
double getCost();
Movie & operator=(const Movie & other);
/* overloads "=" operator */
bool operator==(const Movie & other);
/* overloads "==" operator */
private:
// you get to decide what goes here
std::string title;
Set<std::string> keyWords;
Set<std::string> actors;
double rentalCost;
};
#endif