i am making a scheduling system. my problem now is how to display the schedule. my query statement displays the schedule of a particular teacher on a particular day
but there is also a 08:00-09:00 class but this teacher is vacant at that time.
what i would like to do is put the list of time in a list ... then compare it to the list of time of the teacher ... if time (list) is not on time (teacher) then it will put null.
this will be the content of the list
again the loop should compare two list ... if if time (list) is not on time (teacher) then it will put null.
what loop mechanism will i used? i think my problem is my loop logic
i tried
list of subject
if (list time == list of time(teacher)) save list subject break else save null break
but its saving 6 data instead of 3 .. i tried doing this during query statement but i cant
i think its if (list time.size() != list time(teacher).size()) find missing time then null values ... but how will i do it?
Maybe this logic could help you out.
Previous (End time) | Current (End time of the previous sched) | Next (Start Time of the next sched)
8 8 9
if CURRENT_TIME is equal to NEXT_TIME then
// probably this sched is not vacant
else
// current time TO next start time is vacant.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.