-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
we got a tiny menu which is helpful for the rest of project. i also a…
…dded the link to the schedule. now we need to make it clean and pretty such as the grade page
- Loading branch information
Showing
5 changed files
with
194 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,51 @@ | ||
#include "jce.h" | ||
|
||
jce::jce() : userAcc() | ||
jce::jce() : userAcc(),jDates() | ||
{ | ||
handler = new jceHandler(&userAcc); | ||
handler = new jceHandler(&userAcc,&jDates); | ||
|
||
} | ||
|
||
void jce::start() | ||
{ | ||
handler->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); | ||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.