Skip to content

sagarrajak245/java-_project_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Car Rental System

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.

Features

  • 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.

Getting Started

Prerequisites

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

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/car-rental-system.git
  2. Navigate to the project directory:
    cd car-rental-system
  3. Open the project in your preferred IDE.
  4. Build and run the project.

Usage

Renting a Car

To rent a car, use the following command in the application's interface:

carRentalSystem.rentCar(userId, carId, rentalDuration);

Returning a Car

To return a rented car, use the following command:

carRentalSystem.returnCar(userId, carId);

Calculating Rental Price

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.

Renting Multiple Cars

Users can rent multiple cars by calling the rentCar method multiple times with different car IDs.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any changes you'd like to make.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

If you have any questions or suggestions, feel free to reach out.

Acknowledgements

Thanks to the open-source community for their invaluable contributions.

About

This is my first java project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages