Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cinema Ticket Booking System

A desktop application built with C++ and Qt for managing cinema operations, including movie schedules, seat reservations, and ticket bookings. This system supports both customer and administrative roles with a complete booking workflow and management interface.

Note: This is a school project developed for educational purposes.


Overview

The Cinema Ticket Booking System is a comprehensive solution designed to simplify every aspect of the movie-going experience—from securing tickets online to managing movie data and theater operations. The application features two main interfaces: one for end-users (moviegoers) and one for administrators. Each interface is tailored to deliver a seamless, secure, and engaging experience.


Features

User-Facing Modules

Authentication and Registration

  • Registration:
    • Users must provide a username (min. 3 characters), strong password (min. 8 characters), valid email, first name (min. 2 characters), and last name.
    • The system checks for empty fields and matching passwords before allowing registration, ensuring data integrity and security.
  • Login:
    • Confirms that the username and email match stored details, protecting against unauthorized access.

Core User Interface Features

  • Home Screen:
    Central hub for browsing available movies, booking tickets, and managing a personalized watchlist.

  • Now Showing:
    Dedicated section highlighting movies currently in theaters, with instant booking options.

  • Book Now Module:

    • Displays detailed movie information (title, director, genre, etc.).
    • Enables users to choose a cinema, specify cinema type, select date/time, and reserve seats based on live availability.
    • After seat selection, users securely finalize the booking.
  • Price Details & Discounts:

    • Tickets offer varied pricing (Regular, Student, Senior) with automatic discount calculation.
    • Multiple payment methods supported for flexibility at checkout.
  • Order Confirmation & Receipt:

    • Generates a detailed receipt upon booking, confirming all details and total price.

Additional Features

  • Coming Soon & Watchlist:

    • Users can mark upcoming movies and manage a personalized watchlist for easy tracking.
  • My Bookings:

    • View and manage past bookings, download receipts, and cancel bookings if necessary.

Admin Modules

The admin interface is a powerful backend toolset for operational management and data integrity, divided into several key components:

  • Movie Management:

    • Add, update, or delete movies (with poster upload).
    • Admins input or modify movie details (title, genre, director, description, release date).
  • Showtime Management:

    • Create and schedule showtimes by assigning movies to specific cinemas, screens, dates, and times.
    • Update or delete showtimes with confirmation prompts.
  • Cinema Management:

    • Add new cinemas (name, type, seating capacity).
    • Update or remove cinemas as needed.
  • Seat Management:

    • Configure seating arrangements for each cinema by adding or modifying seats.
    • Ensures accurate seat availability during booking.
  • Booking Management:

    • View, add, update, or delete bookings.
    • Includes verification steps for modifications or deletions.
  • User Management:

    • View, add, update, or delete user accounts.
    • Assign roles ('admin' or 'user') and securely manage user data.
  • Analytics Dashboard:

    • View revenue reports and booking statistics.

Database Schema

The system uses MySQL with the following core tables:

  • Users: User accounts, authentication, and roles
  • Movies: Movie catalog with metadata and posters
  • Theaters: Cinema locations and details
  • CinemaTypes: Different formats (2D, 3D, IMAX, Director's Club) with price modifiers
  • Showtimes: Movie scheduling with pricing
  • Seats: Theater seating layout and numbering
  • TicketTypes: Pricing tiers and discount percentages (Regular, Senior/PWD, Student)
  • Bookings: Reservation records with payment tracking
  • Watchlist: User movie preferences

Prerequisites

  • Qt Framework: 5.15+ or 6.x (Qt Widgets & Qt SQL modules)
  • Compiler: C++17 compatible (MSVC 2019+, MinGW, GCC 9+, Clang 10+, Xcode 12+)
  • Database: MySQL 8.0+ or MariaDB 10.5+
  • MySQL Workbench: For database management (recommended)
  • Platform: Windows 10+, Ubuntu 20.04+, or macOS 11+

Installation and Setup

1. Clone the Repository

git clone https://github.com/markalvincadangin/CinemaTicketBookingSystem.git

2. Database Setup

Step 1: Install MySQL and MySQL Workbench

  1. Download and install MySQL Server from MySQL Downloads
  2. Download and install MySQL Workbench from MySQL Workbench Downloads
  3. Remember your root password during installation

Step 2: Connect to MySQL using Workbench

  1. Open MySQL Workbench
  2. Create a new connection:
    • Connection Name: Cinema System
    • Hostname: localhost
    • Port: 3306 (default)
    • Username: root
    • Password: [Your MySQL root password]
  3. Test the connection and click OK

Step 3: Import Database Schema

  1. Connect to your database server
  2. Create the database:
    CREATE DATABASE IF NOT EXISTS cinema;
    USE cinema;
  3. Import the main schema:
    • Go to File → Open SQL Script
    • Select cinema.sql from your project folder
    • Click Execute to run the script

Step 4: Import Sample Data (Recommended)

  • Import cinema_preset_data.sql using the same steps as above

Step 5: Verify Database Setup

Run these queries in MySQL Workbench:

USE cinema;
SHOW TABLES;
SELECT COUNT(*) as movie_count FROM Movies;
SELECT COUNT(*) as user_count FROM Users;
SELECT COUNT(*) as theater_count FROM Theaters;
SELECT * FROM CinemaTypes;
SELECT * FROM TicketTypes;

Expected Results:

  • 9 tables: Users, Movies, Theaters, CinemaTypes, Showtimes, Seats, TicketTypes, Bookings, Watchlist
  • Movies: 20+ sample movies
  • Users: 1 admin user
  • Theaters: 4 cinema locations
  • CinemaTypes: 4 types (2D, 3D, IMAX, Director's Club)
  • TicketTypes: 3 types (Regular, Senior/PWD, Student)

3. Configure Database Connection

Edit the database connection settings in main.cpp around line 17:

QString dbDriver = "QMYSQL";
QString dbHost = "localhost";
QString dbName = "cinema";
QString dbUser = "root";              // Your MySQL username
QString dbPassword = "mark15";        // Change to YOUR MySQL password

Important: Replace "mark15" with your actual MySQL root password.


4. Build the Application

Option A: Qt Creator (Recommended)

  1. Open Qt Creator
  2. Open Project: Select CinemaTicketBookingSystem.pro
  3. Configure Kit: Ensure Qt SQL module and MySQL drivers are available
  4. Build and Run: Press Ctrl+R or F5

Option B: Command Line

qmake CinemaTicketBookingSystem.pro
make          # Linux/macOS
nmake         # Windows with MSVC
mingw32-make  # Windows with MinGW

Option C: Visual Studio (Windows)

  1. Ensure Qt VS Tools extension is installed
  2. Open CinemaTicketBookingSystem.sln
  3. Build solution (F7)

5. Running the Application

  1. Ensure MySQL server is running
  2. Run the executable from the build directory
  3. Login with admin credentials (if you imported sample data):
    • Username: admin
    • Password: admin
  4. Create regular user accounts through the registration dialog

Usage

For Users

  1. Register a new account or login with existing credentials
  2. Browse movies on the home page (Now Showing/Coming Soon)
  3. Select a movie and click "Book Now"
  4. Choose theater location and cinema type
  5. Select date and available showtime
  6. Pick seats from the interactive seating chart
  7. Choose ticket types (Regular/Senior/PWD/Student) for automatic discounts
  8. Complete checkout with payment details
  9. Receive booking confirmation with receipt

For Administrators

  1. Login with admin credentials (admin/admin)
  2. Manage Movies: Add, update, or delete movies
  3. Manage Showtimes: Create, update, or delete showtimes
  4. Manage Theaters and Seats: Add cinemas and configure seating
  5. Manage Bookings: View, modify, or cancel bookings
  6. Manage Users: Add, update, or delete user accounts

Sample Data Included

If you imported cinema_preset_data.sql:

  • 4 Theaters: SM City, Robinsons Place, Vista Mall, Festive Walk (Iloilo locations)
  • 4 Cinema Types: 2D (₱0), 3D (+₱50), IMAX (+₱120), Director's Club (+₱200)
  • 3 Ticket Types: Regular (0%), Senior/PWD (20% discount), Student (15% discount)
  • 20+ Movies: Mix of now showing, coming soon, and archived
  • Admin Account: Username admin, Password admin
  • Sample Seats: Different configurations per theater

Troubleshooting

Database Connection Issues

  • MySQL not running: Start MySQL service
  • Connection refused: Check port, firewall, and credentials in main.cpp
  • QMYSQL driver not found: Reinstall Qt with SQL module, ensure MySQL client libraries, check libmysql.dll

Build Issues

  • Qt SQL module missing: Install Qt SQL addon
  • C++17 errors: Update compiler or Qt version
  • Missing UI files: Ensure .ui files are in project directory

Runtime Issues

  • Stylesheet not loading: Check resource.qrc compilation
  • Movie posters missing: Create posters/ directory with image files
  • Database queries failing: Check MySQL connection and table structure

Customization

  • Database Connection: Modify connection settings in main.cpp
  • Movie Posters: Place JPG/PNG files in posters/ directory
  • Styling: Edit QSS files in styles/ directory (if they exist)
  • Sample Data: Modify cinema_preset_data.sql to customize theaters, movies, and pricing
  • Seat Layout: Update seat configurations in MySQL Workbench

Known Limitations

  • Currency: Fixed to Philippine Peso (₱) pricing
  • Payment: Simulation only, no real payment integration
  • Deployment: Designed for local MySQL installation
  • Security: Educational-level authentication (plain text passwords)
  • Scalability: Single-user desktop application

Support

For setup assistance:

  1. Database Issues: Use MySQL Workbench to verify connection and tables
  2. Build Problems: Check Qt Creator kit configuration and dependencies
  3. Runtime Errors: Review debug output and database logs
  4. File Paths: Ensure all project files are in correct locations

Common Solutions:

  • Restart MySQL service if connection fails
  • Rebuild project if UI changes don't appear
  • Check main.cpp database credentials
  • Verify Qt SQL module installation

This is an educational project developed for learning purposes. Not intended for commercial use.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages