-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
49 lines (42 loc) · 898 Bytes
/
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
#include <iostream>
using namespace std;
#include "ItemTracker.h"
int main()
{
// Instantiate Item Tracker
ItemTracker itemTracker;
// Read Data From File
itemTracker.readData();
// Backup Data
// itemTracker.saveData();
while (true)
{
// Display Menu
itemTracker.displayMenu();
// Get Menu Input
int inp;
cin >> inp;
cout << "\n";
if (inp == 1)
{
cout << "Enter Item to Search: ";
string item = "";
cin >> item;
itemTracker.findItem(item);
}
else if (inp == 2)
{
itemTracker.printList();
}
else if (inp == 3)
{
itemTracker.printHistogram();
}
else if (inp == 4)
{
cout << "\nGoodbye!\n";
break;
}
}
return 0;
}