Object-Oriented Programming · Rippling · Medium
Problem: Pay drivers through a timestamp (payUpUntil) Create a basic payroll component for drivers. Driving records arrive continuously, and one driver can contribute multiple records. Every driving record includes at least: driverId: a unique driver identifier, represented as a string or integer startTime: when the trip begins endTime: when the trip ends, with endTime >= startTime guaranteed salary: the precomputed total payment for that record Implement: payUpUntil(t):…
Checking your access…