r/learnSQL • • 18d ago

Title: Day 62-64 — Combined update: built and published a Car Rental System in Java (feedback welcome)

Over the last three days I built a console-based Car Rental System in Java, applying the OOP concepts from the past few weeks. Repo: https://github.com/Sumitgupta2005/Car_Rental_System

What it does:

  • Menu with three options: rent a car, return a car, exit
  • A Car class with private fields (ID, brand, model, base price per day, availability), a constructor, and getters
  • Asks for confirmation (Y/N) before completing a rental
  • Keeps the cars in a list and updates availability when a car is rented or returned

After the feedback I got here on my last project (don’t leave the errors for the end), I tried to test each part as I wrote it.

I’d appreciate a review of the code structure and README. What would you improve first: input validation, splitting into more classes, exception handling, or saving data to a file or database?

5 Upvotes

0 comments sorted by