-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovies.h
57 lines (47 loc) · 2.03 KB
/
Movies.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
/******************************************************************
* Movies.h
*
* Models a collection of Movies as a std::vector
*
* ***************************************************************/
//using the include guard
#ifndef _MOVIES_H_
#define _MOVIES_H_
#include <vector>
#include <string>
#include "Movie.h"
class Movies
{
private:
std::vector<Movie> movies;
public:
Movies(); // Constructor
~Movies(); // Destructor
/*************************************************************************
add_movie expects the name of the move, rating and watched count
It will search the movies vector to see if a movie object already exists
with the same name.
If it does then return false since the movie already exists
Otherwise, create a movie object from the provided information
and add that movie object to the movies vector and return true
*********************************************************************/
bool add_movie(std::string name, std::string rating, int watched);
/*************************************************************************
increment_watched expects the name of the move to increment the
watched count
It will search the movies vector to see if a movie object already exists
with the same name.
If it does then increment that objects watched by 1 and return true.
Otherwise, return false since then no movies object with the movie name
provided exists to increment
*********************************************************************/
bool increment_watched(std::string name);
/*************************************************************************
display
display all the movie objects in the movies vector.
for each movie call the movie.display method so the movie
object displays itself
*********************************************************************/
void display() const;
};
#endif // _MOVIES_H_