-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
70 lines (52 loc) · 1.27 KB
/
main.cpp
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
#include <cstdlib>
#include <iostream> //provides cin and coutt
#include <fstream> //provides ifstream
#include <string> //provides c++ string methods
#include <cstring>
#include <iomanip>
#include <sstream> //provides c style string methods
#include "exam2.h"
using namespace std;
int main()
{
MovieTree Netflix;
Netflix.buildTree();
int input = 0;
while (input!=5)
{
//Netflix.printMovieInventory();
cout << "======Main Menu=====" << endl;
cout << "1. Rent a movie" << endl;
cout << "2. Print the inventory" << endl;
cout << "3. Delete a movie" << endl;
cout << "4. Count the movies" << endl;
cout << "5. Quit" << endl;
cin>>input;
if(input==1)
{
int num;
cout<<"Enter title:"<<endl;
cin>>num;
Netflix.findMovie(num);
}
if(input==2)
{
Netflix.printMovieInventory();
}
if(input==3)
{
int num;
cin>>num;
Netflix.deleteMovieNode(num);
}
if (input==4)
{
cout<< Netflix.countMovieNodes()<<endl;
}
if(input==5)
{
//4Netflix.DeleteAll(root);
cout<<"Goodbye"<<endl;
}
}
}