Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Rental System

A terminal-based vehicle rental management application developed in Java using a layered architecture (DAO, Service, Model). The system allows users to register, log in, and rent vehicles such as cars, motorcycles, and helicopters.

📌 Features

  • User authentication with email and password (hashed using SHA-256)
  • Admin-defined vehicles and categories
  • Vehicle search and category-based filtering
  • Hourly, daily, weekly, and monthly rental options
  • Corporate users can only rent vehicles monthly
  • Deposit requirement for vehicles over 2 million TL and users under 30 years old
  • Paginated vehicle listing
  • View rental history
  • Terminal-based interactive menu system
  • PostgreSQL database with proper relational design

🧱 Technologies Used

  • Java 21
  • PostgreSQL
  • JDBC
  • Maven (or manual PostgreSQL JAR inclusion)
  • SHA-256 password encryption
  • Layered architecture (Model, DAO, Service, Main)
  • SQL (with relationships and JOIN operations)

⚙️ How to Run

  1. Clone this repository.
  2. Import the SQL backup file located at resources/db_backup.sql into your PostgreSQL database.
  3. Configure your database connection in the code.
  4. Build and run the application using an IDE or terminal.

💾 Database

The system uses a PostgreSQL database with the following tables:

  • users
  • vehicles
  • vehicle_categories
  • rentals

Sample data is included in the SQL backup.

🔐 Authentication & Authorization

  • Passwords are hashed using SHA-256.
  • Only authenticated users can rent vehicles.
  • Only admin users can add or manage vehicles.

📝 Rental Rules

  • Rental durations: hourly, daily, weekly, monthly
  • Corporate users must rent for at least one month
  • If a vehicle's price exceeds 2 million TL:
    • User must be over 30 years old
    • A 10% deposit is required

📦 Sample Data

You can find sample users, vehicles, and categories in the SQL backup file.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages