Welcome to the Car Rental System! This project is a core Java application that allows users to rent and return cars, calculate rental prices, and handle multiple car rentals seamlessly.
- Rent a Car: Users can rent a car from the available cars.
- Return a Car: Users can return a rented car.
- Price Calculation: The system calculates the rental price based on the rental duration.
- Multiple Car Rentals: Users can rent multiple cars at the same time.
To run this project, you need to have the following installed on your machine:
- Java Development Kit (JDK) 8 or higher
- An Integrated Development Environment (IDE) such as IntelliJ IDEA or Eclipse
- Clone the repository:
git clone https://github.com/yourusername/car-rental-system.git
- Navigate to the project directory:
cd car-rental-system
- Open the project in your preferred IDE.
- Build and run the project.
To rent a car, use the following command in the application's interface:
carRentalSystem.rentCar(userId, carId, rentalDuration);
To return a rented car, use the following command:
carRentalSystem.returnCar(userId, carId);
The rental price is automatically calculated when a car is returned. The price is based on the rental duration and the car's rental rate.
Users can rent multiple cars by calling the rentCar method multiple times with different car IDs.
Contributions are welcome! Please fork this repository and submit a pull request for any changes you'd like to make.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to reach out.
- Email: sagarrajak245@gmail.com
- GitHub: yourusername
Thanks to the open-source community for their invaluable contributions.