Is the store open? Hours with split shifts and overnight windows
Write a check that answers whether a store is open at a given moment, in Java. The schedule starts simple and gets richer step by step, and every earlier query must keep working as it grows:
- Opening hours that differ by day of the week.
- Days with more than one opening window (a split shift, closed over lunch).
- Windows that run past midnight into the next day.
Keep the model and the code readable; at the end expect to talk about how you structured it and what you would change.
No answer yet. Write the first one; the best answer gets endorsed.
