Design Uber

Questions

  • Rider can:
    • Create a trip
      • Source location
      • destination location
    • Driver matching
    • Pricing
      • maybe driver’s rating
      • maybe rider’s rating
      • distance
      • weather?

Classes

  • Rider
  • Driver
  • Rider Manager
  • Driver Manager
  • Trip: store driver, rider
  • Strategy Design Pattern:
    • StrategyManager:
      • DriverMatchingStrategy <<interface>>
        • LeastTimeTakenStrategy
        • method: matchDriver()
      • PricingStrategy <<interface>>>
        • DefaultPricingStrategy
        • RatingBasedPricingStrategy
        • method: calculatePrice()