Repository navigation
Expand file tree
/
Copy pathmain.cpp
More file actions
81 lines (73 loc) · 1.43 KB
/
Copy pathmain.cpp
File metadata and controls
81 lines (73 loc) · 1.43 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
Steven Steele
May 8, 2018
Rental Manager
*/
#include "rental.h"
#include <algorithm>
void clear()
{
cin.clear();
cin.ignore(20, '\n');
}
void intro()
{
cout << " **********Rental Manager**********\n\n"
<< "Enter number of option you would like to select:\n"
<< "--------------------------------------------------\n"
<< "1. Search for customer\n"
<< "2. Create new customer account\n"
<< "3. View list of all customers\n"
<< "4. Create new item\n"
<< "5. View all items\n"
<< "0. Save and quit\n\n";
}
int main()
{
intro();
load();
string n;
getline(cin, n);
while (n != "0")
{
if (n == "1")
{
findName();
}
else if (n == "2")
{
Customer::createCustomer();
}
else if (n == "3")
{
for (auto a : Customer::customers_)
{
cout << a.getLastName() << ", " << a.getFirstName() << " - " << a.getPhoneNumber() << endl;
}
}
else if (n == "4")
{
Item::createItem();
}
else if (n == "5")
{
cout << endl;
for (auto a : Item::items_)
cout << a.barcode_ << " " << a.description_ << endl;
}
else if (n == "42")
{
cout << "CREATED BY STEVEN STEELE FOR THE BENEFIT OF MAN AND MICHAEL\n";
}
else
{
cout << "Not a valid selection\n";
}
cout << "\n\n\n\n\n";
intro();
save();
sort(Customer::customers_.begin(), Customer::customers_.end());
getline(cin, n);
}
return 0;
}