Skip to content

TahaRehmanHaroon/Flight-Booking-OOP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Flight Booking OOP

Archive Note (2nd Semester OOP Project)

Note: This repository marks my transition from procedural design into core Object-Oriented Programming (OOP) paradigms. Originally developed approximately 1.5 years ago during my 2nd semester, it illustrates how structures, data isolation, and class relationships are leveraged to build reliable simulation environments.

Advanced algorithmic tools, visualizations, and portfolios from my current 5th semester are being curated and launched on this profile simultaneously.


System Overview

Aerius is an enterprise-modeled command-line flight management and booking engine built entirely in C++. Moving away from global routines, the system tightly couples data and behaviors inside robust classes. The application models an airline platform where users can spin up accounts, manage secure digital wallets, parse dynamic flight paths, and reserve precise seating configurations with automated financial settlement.


Core OOP Architecture & Implementations

1. Encapsulated Domain Modeling

Rather than managing disconnected arrays, the system isolates properties and logic into clear C++ classes:

  • User: Handles individual account attributes (IDs, unique profiles, and secure operational logic).
  • Flight: Manages metadata surrounding schedules, destination matrices, and baseline fare computations.
  • BookingEngine: Coordinates transactional logic, cross-class communication, and structural validation.

2. Multi-Tier Class Seating Matrices

The engine provides a granular lookup for booking options:

  • Seating Configuration Tiers: Supports distinct operational experiences across First Class, Business Class, and Economy Class.
  • Dynamic Fare Modifiers: Implements structural pricing rules where luxury tiers (First/Business) apply multiplier formulas to baseline destination costs dynamically.

3. File Streams & Dynamic Database Syncing (fstream)

The engine treats the local hardware environment as a multi-table database system:

  • Data Serialization: Active state shifts (like changing a password or buying a ticket) serialize back to persistent flat-file storage instantly.
  • Concurrency & Collision Prevention: Prevents double-booking conditions by actively mapping and parsing seating structural maps before confirming reservations.

4. Financial Ledger & Digital Wallet Control

  • State-Checked Transactions: Every user entity maintains an encrypted monetary balance variable.
  • Safe Settlement: The checkout system runs real-time condition checks. If Wallet Balance < Ticket Cost, transactions fail explicitly with an out-of-funds validation warning. If approved, balances are deducted, and data updates are written instantly across databases.

Features Breakdown

  • Secure Authentication Hub: Independent Registration and Sign-In corridors verifying uniqueness against pre-cached indices.
  • Dynamic Route & Destination Selection: Real-time calculation of distances, flight paths, and variable pricing.
  • Automated Balance Settlements: Secure calculation loops managing real-world checkout environments including logic error prevention (e.g., stopping negative balance injection).

System Requirements & File Placeholders

To build and run this workspace smoothly without local path exceptions, ensure the execution directory contains these text-based database registers:

  • users_db.txt — Stores credential hashes, unique IDs, and member names.
  • user_balances.txt — Maintains localized economic ledger values tied securely to User IDs.
  • flight_manifests.txt — Tracks dynamic matrix arrays for seats and plane capacities across active routes.

Compilation and Execution

This architecture compiles cleanly on any standard GCC or Clang toolchain layout using C++11 or newer:

g++ main.cpp -o AeroReserveEngine
./AeroReserveEngine

About

A high-performance C++ Flight Reservation Engine implementing strict OOP paradigms and flat-file databases to manage secure user authentication, dynamic multi-tier cabin seating, and dynamic wallet transactions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors