|
main()
{
display1();
getsubjectcodes&database();
display2();
getTimetobeblocked();
getTimetable();
display timetable();
}
display FigA();
display FigB();
displayTimetable (pass in timetable)
{
display();
return 'next' or 'end';
}
getTimetable()
{
get structure
sort and get possible timetable
once a timetable is out
call displayTimetable();
if displayTimetable returns
'next'
{
continue sorting;
once a possible timetable is out
call displayTimetable();
}
if displayTimetable returns 'end'
exit from program;
}
getsubjectcodes&database()
{
read in subject codes keyed
in by user as strings;
count total number of subject codes;
for (i=0; i<totalnumber;
i++)
{
read subject code;
compare subject code with database;
if (have subject code's timetable)
{
get indexNo;
get lecture1;
get lecture2;
get lecture3;
get tutorial1;
get tutorial2;
get lab1;
get lab2;
}
i++;
}
getTimetobeblocked()
{
get Day;
append to structure
get Time;
append to structure
get next;
}
|