Help C Task E Overlapping Time Slots Add New Function Bool Timeoverlap Timeslot Ts1 Timesl Q37030734

Help C++

Task E. Overlapping time slots?

Add a new function

bool timeOverlap(TimeSlot ts1, TimeSlot ts2);

The function should return true if the two time slots overlap,otherwise return false. (Take into account the starting times ofthe time slots and the duration of the scheduled movies.)

Modify main function to test your code.

Hint: You may use minutesUntil to check which time slot isearlier, then find the how long is the interval between theirstarting times. They overlap if the movie duration isgreater than the interval between the time slots’ startingtimes. Alternatively, converting times into minutes since midnightcan be a good idea as well.

(By the way, if

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.