Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🎬 Cinema Booking System

A professional C-based cinema ticket booking and management system with comprehensive movie management, seat booking, and payment processing. Available in both console and GUI versions for Windows.

Features

Admin Portal

  • Login with admin / admin
  • Add and delete movies with automatic room assignment
  • View all movies and seat availability
  • Real-time booking management and analytics

Client Portal

  • Login with movie / movie
  • Browse available movies and showtimes
  • Book 1-2 seats with manual or automatic selection
  • Secure credit card payment processing
  • View booking history and ticket details

Quick Start

Using Makefile (Recommended)

make                   # Build console version (default)
make console           # Build console version only
make gui               # Build GUI version only (Windows)
make clean             # Clean all build artifacts
make run               # Build and run console version

Using Build Scripts

Windows (Batch Files)

build_console.bat      # Build console version
build_gui.bat          # Build GUI version

Unix/Linux/macOS (Shell Scripts)

./build_console.sh     # Build console version

Running the Applications

build/cinema_system.exe     # Console version (Windows)
build/cinema_system         # Console version (Unix/Linux/macOS)
build/cinema_gui.exe        # GUI version (Windows only)

Project Structure

├── src/                    # Source code (23 files)
│   ├── main.c             # Console entry point
│   ├── gui_main.c         # GUI entry point
│   ├── config.h           # System configuration
│   ├── types.h            # Data structures
│   ├── utils.c/h          # Utility functions
│   ├── auth.c/h           # Authentication system
│   ├── menu.c/h           # Menu system
│   ├── movie.c/h          # Movie management
│   ├── ticket.c/h         # Ticket management
│   ├── booking.c/h        # Booking logic
│   ├── payment.c/h        # Payment processing
│   ├── cleanup.c/h        # Memory management
│   ├── admin_handler.c/h  # Admin interface
│   └── client_handler.c/h # Client interface
├── build/                 # Build output directory
│   ├── cinema_system.exe  # Console executable
│   └── cinema_gui.exe     # GUI executable
├── Makefile               # Cross-platform build system
├── build_console.bat      # Windows console build
├── build_console.sh       # Unix console build
├── build_gui.bat          # Windows GUI build
├── .gitignore            # Git ignore rules
└── README.md

How It Works

  1. Authentication: Login as admin or client with provided credentials
  2. Movie Management: Admin adds movies → Automatic room assignment (1-19)
  3. Booking Process: Client selects movie → Chooses date → Selects seats → Payment
  4. Payment: Credit card validation using Luhn algorithm
  5. Confirmation: Unique ticket ID generated with booking details

Requirements

  • C Compiler (GCC/MinGW recommended)
  • Make (optional, for using Makefile)
  • Windows OS (for GUI version)
  • Unix-like OS support (console version)
  • Minimum 4MB RAM for operation

Usage

Admin: Login with admin / admin to manage movies and view system analytics

Client: Login with movie / movie to browse movies and book tickets

Test Credit Cards:

  • 4535523456789012 (Visa)
  • 5425233430109903 (Mastercard)
  • Format: Spaces and hyphens allowed

Build System Features

  • Cross-platform Makefile with OS detection and automatic directory creation
  • Shell scripts for Unix/Linux/macOS compatibility
  • Batch files for Windows compatibility with GCC auto-detection
  • Clean functionality removes all build artifacts
  • Organized output in build/ directory structure
  • Error handling with informative build messages

Technical Features

Security & Reliability

  • Buffer overflow protection and memory leak prevention
  • Input validation and sanitization
  • Safe string operations (strcpy_s, strncpy_s)
  • Integer overflow protection
  • Credit card validation (Luhn algorithm)

Advanced Features

  • Dynamic memory allocation with proper cleanup
  • Consistent room assignment per movie-date combination
  • Real-time seat tracking and conflict prevention
  • Unique ticket ID generation with timestamps
  • Modular architecture with 13 specialized modules

Performance

  • Startup Time: < 1 second
  • Memory Usage: < 4MB typical operation
  • Response Time: < 100ms for all operations
  • Memory Efficiency: 80% reduction vs monolithic design

Architecture

Modular Design

  • 13 specialized modules with clear responsibilities
  • Separation of concerns for maintainability
  • Clean interfaces between components
  • Extensible structure for easy feature additions

Data Flow

User Input → Validation → Business Logic → Data Storage → UI Update

Contributing

Code Standards

  • C11 Standard with modern safety features
  • Consistent formatting and comprehensive documentation
  • Testing of all changes with provided scenarios

Bug Reports

Include:

  • Operating system and compiler version
  • Steps to reproduce the issue
  • Expected vs actual behavior
  • Error messages or logs

License

This project is developed for educational and demonstration purposes. Free to use and modify according to your needs.


🎬 Cinema Booking System - Professional ticket booking made simple

Built with C11, designed for reliability and performance

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages