You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A professional C++ travel booking application featuring both a Console Interface and a Premium GUI built with the Nana C++ Library. Demonstrates advanced Object-Oriented Programming concepts with a focus on clean architecture and code reusability.
Project Information
Field
Value
Course
Object-Oriented Programming with C++
Author
Muhammad Tasiu-20231723, Muhammad Auwal-20231925, Muhammad Lele-20231940
Date
January 2026
Language
C++17
GUI Framework
Nana C++ Library
Build System
CMake / Make
Features
Core Functionality
Flight Booking: Search and book flights by origin/destination with seat class selection
Hotel Booking: Search and book hotels by city and star rating
Smart Recommendations: After booking a flight, automatically suggests hotels at your destination
User Management: Register, login, and manage your profile
Booking Management: View all bookings with the ability to cancel
Data Persistence: All data saved to text files automatically
Premium GUI: Dark-themed modern interface with professional styling
User Interface Options
Interface
Description
Console (TravelBookingConsole)
Full-featured text-based menu system
GUI (TravelBookingGUI)
Premium dark-themed graphical interface with Nana
OOP Concepts Demonstrated
Class Hierarchy
Bookable (Abstract Base)
βββ Flight
βββ Hotel
Booking (Abstract Base)
βββ FlightBooking
βββ HotelBooking
User
BookingSystem (Controller/Manager)
Menu (Console UI)
MainWindow (GUI)
Concept Implementation Table
OOP Concept
Where Implemented
Example
Inheritance
Flight : Bookable, Hotel : Bookable
Derived classes extend abstract base
Polymorphism
displayInfo(), isAvailable(), getType()
Virtual functions with runtime dispatch
Encapsulation
All classes
Private members with public getters/setters
Abstraction
Bookable, Booking classes
Pure virtual functions (= 0)
Composition
BookingSystem
Contains vectors of bookings, flights, hotels, users
C++ Compiler: g++ 10+ or MSVC 2019+ with C++17 support
CMake: Version 3.15+ (for GUI version)
Git: For cloning Nana library
Option 1: CMake Build (Recommended for GUI)
# Clone Nana library (if not already present)
git clone https://github.com/cnjinhao/nana.git lib/nana
# Create build directory
mkdir build &&cd build
# Configure with CMake
cmake .. -G "MinGW Makefiles"# Windows with MinGW# OR
cmake .. -G "Visual Studio 17 2022"# Windows with VS 2022# OR
cmake .. # Linux/Mac# Build
cmake --build . --config Release
# Executables created:# - TravelBookingConsole.exe# - TravelBookingGUI.exe
Option 2: Make Build (Console Only)
make # Build console version
make run # Build and run
make clean # Remove build files
make debug # Build with debug symbols
make release # Build with optimizations
Option 3: Direct Compilation (Console Only)
g++ -std=c++17 -Wall -Wextra -I include -o TravelBooking src/*.cpp
Running the Application
GUI Version (Recommended)
# From build directory
./TravelBookingGUI.exe # Windows
./TravelBookingGUI # Linux
Console Version
./TravelBookingConsole.exe # Windows
./TravelBookingConsole # Linux
π Usage Guide
Quick Start
Launch the application (GUI or Console)
Login with test account: johndoe / john123
Book a Flight: Search β Select β Enter details β Confirm
Book a Hotel: After flight booking, hotels at your destination are pre-filled!
View Bookings: Check your reservations anytime
Cancel if needed: Select booking β Cancel
GUI Navigation
Section
Description
Flights
Search by origin/destination, book with passenger details
Hotels
Search by city/stars, book with check-in/out dates
My Bookings
View all reservations, cancel if needed
Profile
View your account information
Login/Logout
Manage your session
Smart Feature: Flight β Hotel Recommendation
When you book a flight:
The destination city is saved
When you click "Hotels", the destination is auto-filled
Search results show hotels in your destination city first
One-click booking for complete trip planning!
Test Data
Test Accounts
Username
Password
Description
admin
admin123
Administrator account
johndoe
john123
Regular user with sample bookings
janesmith
jane456
Regular user
Sample Flights
Flight
Route
Airline
Price
AA101
New York β Los Angeles
American Airlines
$299
UA202
Chicago β Miami
United Airlines
$249
DL303
San Francisco β Seattle
Delta Airlines
$179
Sample Hotels
Hotel
City
Stars
Price/Night
Grand Hilton
Los Angeles
βββββ
$350
Marriott Downtown
New York
ββββ
$275
Holiday Inn Express
Chicago
βββ
$120
Data File Formats
All data is stored in pipe-delimited text files in the data/ directory.
# Format: TYPE|bookingId|userId|date|price|...specific fields
FLIGHT|1|2|2026-01-21|299.0|1|2|Economy|John Doe
HOTEL|2|2|2026-01-21|700.0|1|2026-02-15|2026-02-17|1|2|John Doe
GUI Styling (Premium Theme)
The GUI uses a custom dark theme with premium styling:
Color Palette
primary: #2962FF // Vibrant blue
accent: #FFAB00 // Gold
background: #121218// Deep dark
surface: #1C1C24 // Card surface
text: #FFFFFF // White text
Typography
Title: Segoe UI Semibold, 28pt
Heading: Segoe UI Semibold, 16pt
Body: Segoe UI Regular, 11pt
Button: Segoe UI Semibold, 11pt
Technical Details
Memory Management
Uses std::unique_ptr for automatic resource cleanup