The Movie Ticket Booking System is a simple console-based C program that allows users to register, log in, search for movies, book tickets, and manage their bookings. The system also includes an admin menu for adding and removing movies, as well as generating revenue reports. The program is designed to be user-friendly, with various features for managing user bookings and applying loyalty points.
- User Registration & Login: Users can register with a unique username and password. Registered users can log in to access additional features.
- Search Movies: Users can search for movies by name.
- View Available Movies: Displays a list of all available movies, including details like showtime, available seats, price per seat, and rating.
- Book Tickets: Logged-in users can book tickets for a selected movie, choose the number of seats, and apply loyalty points for discounts.
- View Bookings: Users can view their booking history, including details of each booking.
- Cancel Bookings: Users can cancel an existing booking, which refunds the seats back to the movie.
- View Movie Details & Reviews: Users can view detailed information about a movie, including user reviews. They can also add their own reviews.
- Add Movies: Admins can add new movies to the system with details like name, showtime, available seats, price per seat, and rating.
- Remove Movies: Admins can remove movies from the system.
- Revenue Report: Admins can view the revenue generated by each movie, as well as the total revenue across all movies.
- Movie: Stores information about each movie, including ID, name, showtime, available seats, price per seat, rating, and reviews.
- Booking: Stores information about each booking, including booking ID, customer name, movie ID, seats booked, and total price.
- User: Stores information about each user, including username, password, booking history, and loyalty points.
The program consists of the following key functions:
initializeMovies()
: Initializes the movie database with a set of predefined movies.
userRegistration()
: Allows a new user to register.userLogin()
: Allows a registered user to log in.logout()
: Logs out the current user.
displayMovies()
: Displays a list of all available movies.searchMovie()
: Allows users to search for a movie by name.viewMovieDetails()
: Displays detailed information about a selected movie, including user reviews.addReview(int movieId)
: Allows users to add a review to a movie.
bookTicket()
: Allows logged-in users to book tickets for a movie.viewBookings()
: Displays the logged-in user's booking history.cancelBooking()
: Allows users to cancel an existing booking.
addMovie()
: Allows the admin to add a new movie.removeMovie()
: Allows the admin to remove a movie.revenueReport()
: Generates a revenue report for the admin.
applyDiscount(int *totalPrice)
: Applies a discount to the total price based on the user's loyalty points.displaySeatLayout(int movieId)
: Displays the seat layout for a selected movie (static layout in this version).
- Clone the repository:
git clone https://github.com/MayankBansal/C_project.git
- Navigate to the project directory:
cd c_project
- Compile the program:
gcc movie_ticket_booking_system.c -o movie_ticket_booking_system
- Run the program:
./movie_ticket_booking_system
- Dynamic Seat Selection: Implementing a dynamic seat selection feature where users can select specific seats.
- Advanced User Interface: Enhancing the user interface with better input validation and more intuitive navigation.
- Database Integration: Replacing the static arrays with a database for more scalable and persistent data management.
- Admin Authentication: Adding a secure login system for admin access.
- movie_system.h: Header file containing the declarations for functions and data structures.
- movie_system.c: Main C file where the logic for the booking system is implemented.
This project is licensed under the MIT License - see the LICENSE file for details.