PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Rippling

Design a delivery cost dashboard with payments

Last updated: Mar 29, 2026

Quick Overview

This question evaluates object-oriented design, time-based calculation and aggregation, data modeling for deliveries and payment state management, and API design for live dashboard totals.

  • medium
  • Rippling
  • System Design
  • Software Engineer

Design a delivery cost dashboard with payments

Company: Rippling

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design an object-oriented delivery cost dashboard service. Implement a class (or set of classes) that supports: 1) add_driver(driver_id: integer, usd_hourly_rate: float) — add a driver who is not yet in the system. 2) record_delivery(driver_id: integer, start_time, end_time) — record a completed delivery for an existing driver; deliveries are entered immediately after completion, no delivery exceeds 3 hours, and time precision must be at least one second. Drivers have individual hourly rates and can run multiple overlapping deliveries; each delivery is paid independently as duration_in_hours × driver_rate (e.g., $10.00/hr for 1h30m pays $15. 00). 3) get_total_cost() — return the aggregated cost of all recorded deliveries across all drivers (suitable for a live dashboard; exact formatting not required). Before coding, discuss and justify how you will store and represent time (e.g., Unix seconds, ISO-8601 strings, timezone handling) and any assumptions. Share design decisions, what you would do differently in production, and demonstrate good OOP practices. Extend the system with payment tracking: 4) pay_up_to(pay_time: integer, Unix time from epoch) — mark as paid all deliveries that ended at or before pay_time. 5) get_total_cost_unpaid() — return the total cost of all recorded deliveries that have not yet been paid. Inputs are valid; concurrency and thread-safety are out of scope.

Quick Answer: This question evaluates object-oriented design, time-based calculation and aggregation, data modeling for deliveries and payment state management, and API design for live dashboard totals.

Related Interview Questions

  • Prevent Duplicate Payments Under High Load - Rippling
  • Design a personalized news aggregator - Rippling (medium)
  • Design a Scalable News Feed - Rippling (medium)
  • Design Scalable Expense Violation Processing - Rippling (hard)
  • Design several large-scale systems - Rippling (hard)
Rippling logo
Rippling
Aug 1, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
20
0

Object-Oriented Delivery Cost Dashboard Service

Goal

Design and implement an object-oriented service to track delivery costs across multiple drivers, support live dashboard totals, and track payment status.

API Requirements

Implement a class (or set of classes) that supports:

  1. add_driver(driver_id: integer, usd_hourly_rate: float)
    • Add a driver who is not yet in the system.
  2. record_delivery(driver_id: integer, start_time, end_time)
    • Record a completed delivery for an existing driver.
    • Deliveries are entered immediately after completion.
    • No delivery exceeds 3 hours.
    • Time precision must be at least one second.
    • Drivers have individual hourly rates and can run multiple overlapping deliveries; each delivery is paid independently as duration_in_hours × driver_rate.
    • Example: 10.00/hr×1h30m=10.00/hr × 1h30m = 10.00/hr×1h30m= 15.00.
  3. get_total_cost()
    • Return the aggregated cost of all recorded deliveries across all drivers (suitable for a live dashboard; exact formatting not required).
  4. pay_up_to(pay_time: integer, Unix time seconds from epoch)
    • Mark as paid all deliveries that ended at or before pay_time.
  5. get_total_cost_unpaid()
    • Return the total cost of all recorded deliveries that have not yet been paid.

Constraints and Assumptions

  • Inputs are valid; concurrency and thread-safety are out of scope.
  • You may discuss and justify time representation (e.g., Unix seconds, ISO-8601 strings, timezone handling) and any assumptions.
  • Demonstrate good OOP practices and share what you would do differently in production.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Rippling•More Software Engineer•Rippling Software Engineer•Rippling System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.