Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

✈️ Flight Reservation System (Java CLI)

A console-based flight booking system built using Java that simulates real-world airline reservation workflows including:

  • 👤 User authentication
  • 🔍 Flight search
  • 🧍 Passenger management
  • 💺 Seat reservation system

🚀 Features

  • 🔐 User Registration & Login
  • 🔍 Search Flights (Source → Destination)
  • 🧍 Passenger Details Management
  • 💺 Seat Availability & Reservation
  • 📅 Date Validation (DOB with Leap Year Support)
  • ⚠️ Input Validation & Error Handling

🧠 System Workflow

📌 Step-by-step flow:

  1. Register/Login
  2. Search for available flights
  3. Add passenger details
  4. View seat layout
  5. Reserve a seat

🧩 Project Structure

📁 Flight-Reservation-System
│── ReservationSystem.java   # Main system (entry point)
│── Passenger class          # Passenger details
│── Flight class             # Flight data model
│── FlightRepository         # Flight database
│── User class               # Authentication system
│── ReservationSystemBase    # Seat handling logic

⚙️ Technologies Used

  • ☕ Java (Core Java, OOP)
  • 📦 ArrayList (Dynamic Storage)
  • 🎯 Exception Handling
  • 🧵 2D Arrays (Seat Matrix)

💺 Seat Layout Representation

Image

Image

Image

Image

Image

Image

  • Rows: 1 → N
  • Columns: A → F
  • [ ] → Available
  • [X] → Reserved

▶️ How to Run

1. Compile the program

javac ReservationSystem.java

2. Run the program

java ReservationSystem

🖥️ Sample Menu

*** Flight Reservation System ***
1. Register
2. Search for Flights
3. Login
4. Make Reservations
5. Passenger Details
6. Exit

🔍 Example Usage

Enter source: Pune
Enter destination: Ahmedabad

Found Flights:
Flight Number: FL007
Departure: 2024-03-04 14:00

⚠️ Validations Implemented

  • ❌ Duplicate usernames not allowed
  • ❌ Invalid seat selection prevented
  • ❌ Must login before booking
  • ❌ Passenger details required before reservation
  • ❌ Date validation with leap year logic
  • ❌ Input mismatch handling (Scanner exceptions)

💡 Future Enhancements (Make it 10/10 🚀)

  • 🌐 GUI (JavaFX / Swing / Web App)
  • 💳 Payment Integration
  • 🗂️ Database (MySQL / MongoDB)
  • 🔐 Password hashing (Security upgrade)
  • 🎟️ Ticket generation (PDF)
  • 📱 REST API backend (Spring Boot)
  • 🤖 AI-based seat recommendation

🧪 Edge Cases Handled

  • Invalid input (letters instead of numbers)
  • Already reserved seats
  • Wrong login credentials
  • Invalid date formats

📈 Learning Outcomes

  • Object-Oriented Programming (OOP)
  • Real-world system design
  • Data structures (ArrayList, 2D arrays)
  • Exception handling
  • CLI application design

👩‍💻 Author

PoojaCodesX


⭐ Support

If you like this project:

  • ⭐ Star this repo
  • 🍴 Fork it
  • 📢 Share it

📜 License

This project is licensed under the MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages