-
Notifications
You must be signed in to change notification settings - Fork 0
/
User.h
62 lines (43 loc) · 1.48 KB
/
User.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
52
53
54
55
56
57
58
59
60
61
62
#ifndef PROJ_USER_HEADER_INCLUDED
#define PROJ_USER_HEADER_INCLUDED
#include "Movie.h"
class User {
public:
//[DONE] constructor
User (string ID, string name);
//[DONE] deep copy constructor
User (const User & other);
//[DONE] destructor
~User ();
//[DONE] gets the users login id
string getID () const;
//[DONE] gets the users name
//Note: removed const (member class const)
string getName ();
//[WORKING] returns a pointer to user's movie queue
queue<Movie*>* movieQueue ();
//[WORKING] sets the user's rented movie to m
//Note: if there's already a rented movie, do nothing
void rentMovie (Movie *m);
//[WORKING] returns the user's rented movie
//Note: if there's no rented movie, do nothing
void returnMovie();
//[WORKING] returns user's checked out movie.
//Note: returns NULL if no movie is checked out
Movie* currentMovie();
queue<Movie*> userQueue; //
Movie* checkedOut; //
set<Movie*> ratedMovies; //A set of movies rated by this user
set<Movie*> notRatedMovies; //A set of movies not rated by this user
map<Movie*, int> myRatings; //Relates the movie ptr and this user's ratings
map<User*, double> similarities; //Relates the other user's ptr and the similarity value
Movie* recommended;
string address;
string cc_number;
int charges;
string password;
private:
string ID;
string name;
};
#endif