PDA

View Full Version : TimePeriod java


Elmedina
Mar 1, 2017, 06:59 PM
TimePeriodOverlap
Create TimePeriod class that has two fields: start date and end date, both of type java.time.LocalTime.
Then, by using a test driven development, add an overlapsWith(TimePeriod) method to the class that takes as an argument another time and checks whether these two overlap. Create a test method for each possible scenario.
The following expression checks whether two periods overlap:
(StartA < EndB) and (EndA > StartB)

CravenMorhead
Mar 2, 2017, 11:05 AM
So... what do you need help with?

Show us your code and your problem and we will help. I will NOT do your homework for you.