PROGRAMMING PROJECT
GROUP NAME: CODE QUEENS COLLECTIVE
GROUP MEMBERS
Ghousia Khoso (24-BS(CS)-44)
Sobia Channa (24-BS(CS)-23)
Alisha Qureshi (24-BS(CS)-58)
Umme Habiba Zaheer (24-BS(CS)-13)
Department of Computer Science
Shaheed Benazir Bhutto University Shaheed
Benazirabad
Movie Ticket Pro
Project Title: “Movie Ticket Pro”
Project description:
Welcome to **MovieTicketPro**, the ultimate Duplex Cinema Booking App that brings
the magic of the silver screen right to your fingertips! With MovieTicketPro, you can
easily book your favorite Hollywood and Bollywood movies, ensuring a seamless and
enjoyable movie-going experience. Say goodbye to long queues and hello to
convenience as you explore a diverse range of movie options and secure your tickets
with just a few taps.
Key Features:
1. Hollywood and Bollywood Movies: Choose from a captivating lineup of Hollywood
and Bollywood movies, catering to all genres and preferences.
2. Real-time Availability: Get up-to-the-minute information on available tickets for each
movie showtime, ensuring you never miss out on the action.
3. User-Friendly Interface: Navigate through the app effortlessly with an intuitive
interface that makes movie selection and ticket booking a breeze.
4. Secure Booking: Rest easy knowing that your personal information is
securely managed, making online booking safe and reliable.
5. Instant Confirmation: Receive an instant confirmation of your booking along with
details of your selected movie, showtime, and ticket count.
6. Ticket Management: Keep track of your booked tickets within the app, making it
convenient to manage your cinema plans
Code:
#include <stdio.h>
#include <string.h>
void welcome();
void hollywood(int *remainingTickets);
void bollywood(int *remainingTickets);
int main()
{
int option;
welcome();
int remainingTickets = 50; // Initialize with total tickets
do
{
printf("What type of Movie do you want to Watch?\n");
printf("1 - Hollywood\n");
printf("2 - Bollywood\n");
printf("3 - Exit\n");
scanf("%d", &option);
switch (option)
{
case 1:
hollywood(&remainingTickets);
break;
case 2:
bollywood(&remainingTickets);
break;
case 3:
printf("Thank you for using the booking system. Goodbye!\n");
return 0;
default:
printf("Invalid option.\n");
}
} while (remainingTickets > 0); // The loop continues while there are remaining tickets
printf("All tickets have been booked.\n");
return 0;
}
void welcome()
{
printf("======================================\n");
printf("| Welcome TO |\n");
printf("| DUPLEX CINEMA |\n");
printf("| BOOK YOUR TICKETS NOW |\n");
printf("======================================\n");
}
void hollywood(int *remainingTickets)
{
char moviesList[4][20] = {"Barbie", "Oppenheimer", "Jawan", "Tiger3"};
int buyerTickets = 0;
char buyerFirstName[10];
char buyerLastName[10];
char buyerEmail[30];
int movieOption;
printf("Please Select a Movie\n");
printf("1 - Barbie 10:00 PM Show\n");
printf("2 - Oppenheimer 12:30 PM Show\n");
scanf("\n%d", &movieOption);
printf("We have total of %d tickets and %d tickets are still available\n",
50, *remainingTickets);
printf("Book your Tickets now and Enjoy Watching :-)\n");
printf("Enter your first name : ");
scanf("%s", buyerFirstName);
printf("Enter your last name : ");
scanf("%s", buyerLastName);
printf("Enter your email : ");
scanf("%s", buyerEmail);
printf("Enter number of tickets do you want to buy : ");
scanf("%d", &buyerTickets);
if (buyerTickets <= *remainingTickets)
{
*remainingTickets -= buyerTickets; // Update remaining tickets
printf("Thank you %s %s for booking %d tickets of %s Movie.\n You will receive a confirmation
email at %s ", buyerFirstName, buyerLastName,
buyerTickets,
moviesList[movieOption - 1], buyerEmail);
printf("\n%d tickets are still available\n", *remainingTickets);
}
else
{
printf("Sorry, not enough tickets available.\n");
}
}
void bollywood(int *remainingTickets)
{
char moviesList[4][20] = {"Barbie", "Oppenheimer", "Jawan", "Tiger3"};
int buyerTickets = 0;
char buyerFirstName[10];
char buyerLastName[10];
char buyerEmail[30];
int movieOption;
printf("Please Select a Movie\n");
printf("1 - Jawan 11:00 PM Show\n");
printf("2 - Tiger3 2:30 PM Show\n");
scanf("\n%d", &movieOption);
printf("We have total of %d tickets and %d tickets are still available\n",
50, *remainingTickets);
printf("Book your Tickets now and Enjoy Watching :-)\n");
printf("Enter your first name : ");
scanf("%s", buyerFirstName);
printf("Enter your last name : ");
scanf("%s", buyerLastName);
printf("Enter your email : ");
scanf("%s", buyerEmail);
printf("Enter number of tickets do you want to buy : ");
scanf("%d", &buyerTickets);
if (buyerTickets <= *remainingTickets)
{
*remainingTickets -= buyerTickets; // Update remaining tickets
printf("Thank you %s %s for booking %d tickets of %s Movie.\n You will receive a confirmation
email at %s ", buyerFirstName, buyerLastName,
buyerTickets,
moviesList[movieOption + 1], buyerEmail);
printf("\n%d tickets are still available\n", *remainingTickets);
}
else
{
printf("Sorry, not enough tickets available.\n");
}
}
Output: