Is the store open? Hours with split shifts and overnight windows

0
Remix

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:

  1. Opening hours that differ by day of the week.
  2. Days with more than one opening window (a split shift, closed over lunch).
  3. 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.

AppleTechnical phone screenLast asked Oct 2026
No answer yet. Write the first one; the best answer gets endorsed.