vagabond-systems / forage-lyft-starter-repo

Lyft starter repo
111 stars 2.49k forks source link

Refactored Classes for Car Service System #125

Open MiliyardMulugeta opened 1 year ago

MiliyardMulugeta commented 1 year ago

In this pull request, I've implemented the following changes:

  1. Introduced the Serviceable interface to ensure consistent service checks across different car parts.
  2. Refactored the Engine and Battery classes to align with the new design.
  3. Implemented specific engine and battery types with their unique service criteria.
  4. Used the composition over inheritance principle for the Car class, making it composed of different parts.
  5. Created the CarFactory class to abstract the car creation process.

These changes aim to make the codebase more modular, maintainable, and flexible. Please review and let me know if any adjustments are needed.