This question evaluates the ability to design an object-oriented in-memory delivery cost and payment accounting system, focusing on modeling time intervals, prorated duration calculations, currency rounding, idempotent payment semantics, time zone handling, numeric precision, and time/space complexity.
You are designing a small in-memory service to track delivery costs for drivers who are paid hourly. Deliveries are recorded with start and end timestamps. The system must compute total cost to date, support marking accrued costs up to a timestamp as paid, and report remaining unpaid amounts.
Make explicit assumptions about time interval semantics (inclusive/exclusive), how to prorate partial hours, and how to round currency.
Login required