-
Notifications
You must be signed in to change notification settings - Fork 2
/
jce.cpp
51 lines (43 loc) · 889 Bytes
/
jce.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 "jce.h"
jce::jce() : userAcc(),jDates()
{
handler = new jceHandler(&userAcc,&jDates);
}
void jce::start()
{
if (handler->start())
{
int ch;
do
{
system("clear");
printf("\n----------------jce API alpha----------------\n");
printf("\tPlease choose as following:\n");
printf("\t\tShow grades: 1\n");
printf("\t\tShow scheduale: 2\n");
printf("\t\tChange dates: 3\n");
printf("\t\ttype q to quit ");
switch(ch)
{
case '1':
handler->requestMenu(jceHandler::GET_GRADES_BY_DATES);
printf("\npress enter to continue...");
getchar();
break;
case '2':
handler->requestMenu(jceHandler::GET_SCHEDULE);
printf("\npress enter to continue...");
getchar();
break;
case '3':
jDates.setDate();
break;
}
}while ((ch = getchar()) != 'q');
}
else
{
printf("\ncouldnt visit");
exit(1);
}
}