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