Skip to content

A Python OOP project that simulates an Expedia-like travel booking system, allowing users to log in, create itineraries with flights and hotels, and reserve them using simulated payment APIs

Notifications You must be signed in to change notification settings

TaherAlabbr/Expedia-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Expedia Project (Python OOP Simulation)

A simplified simulation of Expedia.com, implemented in Python to demonstrate object-oriented programming (OOP), API design, and transaction handling.

The project allows customers to:

  • Create itineraries that include flights and hotels (extensible to cars, cruises, etc.)
  • Reserve and pay using simulated payment APIs
  • View and manage multiple itineraries

This project was built as part of a coursework assignment to practice OOP principles and system design.


Features

  • Login system (dummy users for testing)

  • Itinerary Management

    • Add multiple flights
    • Add multiple hotels
    • Reserve or cancel itineraries
  • Payment Handling

    • Simulated gateways: PayPal and Stripe
    • Handles failed payments and partial reservation rollbacks
  • Extensible OOP Design

    • Easy to extend with new APIs (cars, cruises, activities, etc.)
    • Clean separation of concerns (frontend vs backend)
  • Custom Exception Handling for reservation and payment errors


Tech Stack

  • Language: Python 3.x

  • Paradigm: Object-Oriented Programming (OOP)

  • APIs (simulated):

    • Flights (AirCanada, Turkish Airlines, etc.)
    • Hotels (Hilton, Marriott)
    • Payments (PayPal, Stripe)
  • CLI Frontend (menu-driven interface)


Project Structure

scr/
│
├── backend/
│   ├── api/
│   │   ├── common/
│   │   │   ├── customer_info.py         # Customer info model
│   │   │   └── reservation.py           # Base reservation & itinerary classes
│   │   │
│   │   ├── flights/                     # Flight API integrations
│   │   │   ├── aircanada_external.py
│   │   │   ├── aircanada_mgr.py
│   │   │   ├── flight_common.py
│   │   │   ├── flights_mgr.py
│   │   │   ├── turkish_external.py
│   │   │   └── turkish_mgr.py
│   │   │
│   │   ├── hotels/                      # Hotel API integrations
│   │   │   ├── hilton_external.py
│   │   │   ├── hilton_mgr.py
│   │   │   ├── hotel_common.py
│   │   │   ├── hotels_mgr.py
│   │   │   ├── marriott_external.py
│   │   │   └── marriott_mgr.py
│   │   │
│   │   └── payment/                     # Payment API integrations
│   │       ├── payment_common.py
│   │       ├── paypal_external.py
│   │       ├── paypal_payment.py
│   │       ├── stripe_external.py
│   │       └── stripe_payment.py
│   │
│   ├── common/
│   │   └── exceptions.py                # Custom exception classes
│   │
│   ├── customer_backend_mgr.py          # Orchestrates API calls for customers
│   ├── user.py                          # Customer entity
│   └── users_mgr.py                     # Handles multiple users
│
├── frontend/
│   ├── customer_frontend_mgr.py         # Customer CLI interface
│   ├── frontend_mgr.py                  # Entry for frontend logic
│   ├── siteaccess_mgr.py                # Login & signup handling
│   └── utils.py                         # Menu helper functions
│
├── driver.py                            # Main entry point
└── README.md


Installation & Running

  1. Clone the repository:

    git clone https://github.com/your-username/expedia-project.git
    cd expedia-project/scr
  2. Run the project:

    python driver.py
  3. Follow the CLI menu to:

    • Login
    • Create itineraries (add flights/hotels)
    • Reserve with payment
    • List itineraries

Example Workflow

Login
1. Login
2. Signup [NA]

Choice: 1
Enter username: john
Enter password: ****

Welcome John:
1. View profile [NA]
2. Make itinerary
3. List my itineraries
4. Logout

Choice: 2
Create your itinerary:
1. Add Flight
2. Add Hotel
3. Reserve itinerary
4. Cancel itinerary

  • Add flights or hotels with the menu options.
  • Select "Reserve itinerary" to confirm and pay.
  • If payment fails, all reservations are rolled back.
  • List past itineraries at any time.

Future Enhancements

  • Add car rentals and cruise reservations
  • Replace in-memory storage with database integration
  • Add real API integrations (AirCanada, Hilton, Stripe, etc.)
  • Replace CLI with a web or mobile frontend
  • Add unit tests and CI/CD pipeline

Credits

Project specification by Mostafa S. Ibrahim Implementation in Python with focus on OOP design, API abstraction.

About

A Python OOP project that simulates an Expedia-like travel booking system, allowing users to log in, create itineraries with flights and hotels, and reserve them using simulated payment APIs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages