Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Rental System

A console-based Vehicle Rental System written in Java, built as part of the COMP2310 Object-Oriented Programming course at Birzeit University.

What it does

  • Register multiple customers with rental limits
  • Rent and return vehicles with real-time availability tracking
  • Calculate total rental cost by days or by vehicle type
  • Count rented vehicles by type per customer
  • Display vehicles sorted by price or alphabetically by type

Classes

Vehicle

  • Stores type, registration number, brand, daily rate, availability
  • Includes constructors, getters/setters, and printInfo()

Customer

  • Stores name, ID, license number, and array of rented vehicles
  • Supports rent, return, cost calculation, and vehicle counting

Driver (Main)

  • Manages program flow, user input, and the main menu
  • Contains static utility methods for search and sorting

Key Concepts

  • Object-Oriented Programming (classes, encapsulation, method overloading)
  • Custom sorting algorithms (no built-in sort methods used)
  • Static utility methods
  • Array manipulation

How to Run

  1. Open project in Eclipse IDE
  2. Run the Driver.java file
  3. Follow the prompts to enter customer details and rent vehicles

Menu Options

  1. Print Customer Information
  2. Display Total Rental Cost for a Customer
  3. Count Rented Vehicles by Type
  4. Rent a New Vehicle
  5. Return a Vehicle
  6. Display All Available Vehicles in Ascending Order of Price
  7. Display All Available Vehicles in Alphabetical Order of Type
  8. Exit

Sample Interaction

Enter number of customers: 2 Enter details for customer 1: Enter name: John Doe Enter ID: 1001 ... Vehicle ABC123 rented successfully.

Course Info

  • Course: COMP2310 — Object Oriented Programming
  • University: Birzeit University
  • Semester: Fall 2024/2025

About

Console-based Vehicle Rental System in Jav-OOP design with custom sorting, multi-customer management, and rental tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages