Bird
0
0

Which of the following best describes the relationship between VehicleType and SpotType enums in a parking system?

easy🧠 Conceptual Q2 of 15
LLD - Design — Parking Lot System
Which of the following best describes the relationship between VehicleType and SpotType enums in a parking system?
AVehicleType and SpotType are unrelated and used for different systems.
BVehicleType defines vehicle categories; SpotType defines parking spot categories to match vehicles.
CSpotType enum lists vehicle types, while VehicleType lists spot sizes.
DBoth enums store user preferences for parking.
Step-by-Step Solution
Solution:
  1. Step 1: Identify roles of VehicleType and SpotType

    VehicleType categorizes vehicles (e.g., car, bike), SpotType categorizes parking spots (e.g., compact, large).
  2. Step 2: Match enums to system roles

    VehicleType defines vehicle categories; SpotType defines parking spot categories to match vehicles. correctly states VehicleType defines vehicle categories and SpotType defines spot categories to fit vehicles.
  3. Final Answer:

    VehicleType defines vehicle categories; SpotType defines parking spot categories to match vehicles. -> Option B
  4. Quick Check:

    Enum roles = vehicle vs spot categories [OK]
Quick Trick: VehicleType = vehicles, SpotType = parking spots [OK]
Common Mistakes:
MISTAKES
  • Mixing up which enum represents vehicles or spots
  • Assuming enums store unrelated data
  • Confusing enums with user settings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes