-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdmin.cpp
123 lines (111 loc) · 4 KB
/
Admin.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#include "Student.h"
#include "Teacher.h"
#include <windows.h>
using namespace std;
class Admin
{
public:
Students S;
Teachers T;
void AdminMenu()
{
char choice;
do { cout << "======================================================"
"==================================================================\n"
"\n\n\t\t\t\t\t A D M I N M E N U \n\n\n"
"=============================================================="
"=========================================================="
"\n\t\t\t\t __________________________________________________ "
"\n\t\t\t\t | | "
"\n\t\t\t\t | 1 -> M A N A G E T E A C H E R S | "
"\n\t\t\t\t |________________________________________________| "
"\n\t\t\t\t __________________________________________________ "
"\n\t\t\t\t | | "
"\n\t\t\t\t | 2 -> M A N A G E S T U D E N T | "
"\n\t\t\t\t |________________________________________________| "
"\n\t\t\t\t __________________________________________________ "
"\n\t\t\t\t | | "
"\n\t\t\t\t | 3 -> M A N A G E C O U R S E S | "
"\n\t\t\t\t |________________________________________________| "
"\n\t\t\t\t __________________________________________________ "
"\n\t\t\t\t | | "
"\n\t\t\t\t | 4 -> M A I N M E N U | "
"\n\t\t\t\t |________________________________________________| "
"\n\t\t\t\t __________________________________________________ "
"\n\t\t\t\t | | "
"\n\t\t\t\t | 5 -> E X I T | "
"\n\t\t\t\t |________________________________________________| "
"\n\n=============================================================="
"=========================================================="
"\n\t\t\t\t\t\t ENTER YOU CHOICE = ";
cin >> choice;
system("cls");
switch (choice)
{
case '1':
T.MENU();
break;
case '2':
S.MENU();
break;
case '3':
S.Courses::MENU();
break;
case '5':
exit(0);
break;
default:
system("cls");
}
} while (choice != '4');
}
};
int main()
{
Admin A;
A.S.UpdateTree();
A.S.Courses::UpdateTree();
A.T.UpdateTree();
char choice;
system("COLOR F0");
while (1)
{
cout << "======================================================"
"==================================================================\n"
"\n\n\t\t\t\t\t W E L C O M E \n\n\n"
"=============================================================="
"=========================================================="
"\n\t\t\t\t\t ________________________________ "
"\n\t\t\t\t\t | | "
"\n\t\t\t\t\t | 1 -> S T U D E N T | "
"\n\t\t\t\t\t |______________________________| "
"\n\t\t\t\t\t ________________________________ "
"\n\t\t\t\t\t | | "
"\n\t\t\t\t\t | 2 -> A D M I N | "
"\n\t\t\t\t\t |______________________________| "
"\n\t\t\t\t\t ________________________________ "
"\n\t\t\t\t\t | | "
"\n\t\t\t\t\t | 3 -> E X I T | "
"\n\t\t\t\t\t |______________________________| "
"\n\n=============================================================="
"==========================================================\n"
"\n\t\t\t\t\t\t ENTER YOU CHOICE = ";
cin >> choice;
system("cls");
switch (choice)
{
case '1':
A.S.StudentMENU();
break;
case '2':
A.AdminMenu();
break;
case '3':
exit(0);
break;
default:
system("cls");
}
}
return 0;
}