-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.cpp
More file actions
68 lines (63 loc) · 1.91 KB
/
main.cpp
File metadata and controls
68 lines (63 loc) · 1.91 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
#include <bits/stdc++.h>
#include "ComplaintBox.h"
using namespace std;
int main() {
ComplaintBox cb;
int choice;
do {
cout << BOLDVIOLET << "\n==== Complaint Box Menu ====\n" << RESET;
cout << CYAN
<< "1. Register User\n"
<< "2. Register Admin\n"
<< "3. User Login\n"
<< "4. Admin Login\n"
<< "5. File Complaint\n"
<< "6. Export Complaints to CSV\n"
<< "7. Search Complaints\n"
<< "8. Update Complaint Status (Admin Only)\n"
<< "9. Exit\n"
<< RESET;
cout << WHITE << "Choice: " << RESET;
cin >> choice;
switch (choice) {
case 1:
cb.registerUser();
break;
case 2:
cb.registerUser(true);
break;
case 3:
cb.loginUser();
break;
case 4:
cb.loginUser(true);
break;
case 5:
cb.fileComplaint();
break;
case 6:
cb.exportComplaintsToCSV();
break;
case 7:
cb.searchComplaints();
break;
case 8: {
int id;
string status;
cout << YELLOW << "Enter Complaint ID to update: " << RESET;
cin >> id;
cout << YELLOW << "Enter new status (Pending/In Progress/Resolved): " << RESET;
cin.ignore();
getline(cin, status);
cb.updateComplaintStatus(id, status);
break;
}
case 9:
cout << BOLDGREEN << "Exiting..." << RESET << endl;
break;
default:
cout << BOLDRED << "Invalid choice!\n" << RESET;
}
} while (choice != 9);
return 0;
}