PIC Microproject 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

MICRO PROJECT

Academic year
2023-2024

DESIGN MOVIE TICKET BOOKING

Program: Computer Engineering Program code:CO2K


Course : PROGRAMMING IN C Course code: 312303

Submitted By: Submitted to:

Amaan Abrar Kazi Mr. Tejas Shah


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. Amaan Abrar Kazi Roll No. 58 of Second Semester of Diploma in

Computer Engineering of Institute, VES POLYTECHNIC (Code: 0004) has completed the Micro

Project satisfactorily in Subject Programming in C (312303) for the academic year 2023- 2024. as

prescribed in the curriculum.

Place: CHEMBUR,MUMBAI Enrollment No: 23150920711

Date: ……………………… Exam Seat No: 103769

Subject Teacher Head of the Department Principal

Seal of
Institution
INDEX

Academic year: 2023-2024 Name of the faculty: Mr. Tejas Shah Program code: CO2K

Course & course code: PIC (312303) Name of the candidate: Amaan Kazi

Roll No. 58 Enrollment No.23150920711

Sr.No Content Page No.

1 AIM 1

2 Course Outcomes Addressed 1

3 Resource used 2

4 Action Plan 2

5 Actual Procedure 3

6 Code 4,5,6,7

7 Output 8,9

8 Application of this Micro-Project 10

9 References 10

10 Evaluation Sheet 11,12,13,14

Annexure – I
Micro-Project Proposal
DESIGN MOVIE TICKET BOOKING

1.0 Aim/Benefits of the Micro-Project


The aim of the C code is to create a simple console-based movie ticket booking system.
The code allows users to:
View a list of available movies titles.
Select a movie to get all details of.
Choose number of tickets to book.
Book the selected number of tickets.
Repeat the process until the user chooses to exit.
The code provides a basic structure for implementing a movie ticket booking system in C. It
demonstrates the use of arrays, structures, loops, and conditional statements to manage
movie information and handle user interactions. While it's a simplified version and lacks
advanced features like user authentication, seat reservation management, or payment
processing, it serves as a starting point for building a more comprehensive movie ticket
booking application.

2.0 Course Outcomes Addressed

CO1 - Develop C program using input - output functions and arithmetic expressions.
CO2 - Develop C program involving branching and looping statements
CO3 - Implement Arrays and structures using C programs
CO4 - Develop C program using user-defined functions
CO5 - Write C program using pointer

3.0 Resources Used


Sr.No Equipment Name with Broad Specification Remark if any
.
1 Computer System: Windows 11
Intel Core i5 11th gen, 16GB RAM,

2 Turbo C++

4.0 Action Plan


SR. Details of activity Planned Planned
No. Start date Finish date

1 Finalization of project Title and Scope 5/4/2024 5/4/2024

2 Project Definition 5/4/2024 5/4/2024

3 Information Collection and Analysis of Data 6/4/2024 6/4/2024

4 Design Structure 6/4/2024 6/4/2024

5 Coding 6/4/2024 6/4/2024

6 Output 6/4/2024 6/4/2024

7 Report writing 7/4/2024 7/4/2024

8 Demonstration of project & final submission 8/4/2024 8/4/2024

5.0 Actual Procedure Followed.

Define Movie Structure: The code begins by defining a structure Movie to hold
details about each movie, including its title, description, ratings and ticket price.

Initialize Movie Data: An array of movies is initialized with details of several movies.
Each movie has a title, description, ratings and ticket price.

Main Function: In the main function, The Load Menu function is called which then
calls the Load Movie function with the movie number as argument which shows more
details for that movie and then allows the user to buy tickets for that movie by calling
the Buy function

Load Menu: The load menu function prints out the available movies titles.

Load Movie: The load movie function displays all details about a movie after taking
the movie number as an argument based on the number in menu

Buy: The buy function is defined to handle the booking process for a selected movie.
It prompts the user to select number of seats and displays final price after which the
user can confirm or change no. of tickets to book

Input Validation: The code includes basic input validation to ensure that the user
enters valid choices for selecting movies and seats.

Exit Condition: The loop continues until the user chooses to exit by entering 0.

6.0 Code

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>

// Movie Structure
struct movies {
char title[50];
char description[500];
float rating;
int ticketPrice;
} movie[5];
// Functions
void LoadMenu();
void LoadMovie(int n);
void BuyTicket(int n);

void main ()
{
clrscr();

strcpy(movie[0].title, "Movie 1");


strcpy(movie[0].description, "Description of Movie 1");
movie[0].rating = 4.8;
movie[0].ticketPrice = 300;

strcpy(movie[1].title, "Movie 2");


strcpy(movie[1].description, "Description of Movie 2");
movie[1].rating = 4.5;
movie[1].ticketPrice = 100

strcpy(movie[2].title, "Movie 3");


strcpy(movie[2].description, "Description of Movie 3");
movie[2].rating = 4;
movie[2].ticketPrice = 250;

strcpy(movie[3].title, "Movie 4");


strcpy(movie[3].description, "Description of Movie 4");
movie[3].rating = 4.2;
movie[3].ticketPrice = 80;
4
strcpy(movie[4].title, "Movie 5");
strcpy(movie[4].description, "Description of Movie 5");
movie[4].rating = 4.5;
movie[4].ticketPrice = 120;

LoadMenu();
printf("Press any key to exit");
getch();
}

void LoadMovie(int n)
{
clrscr();
int input;
n--;
printf("Title: %s \n", movie[n].title);
printf("Description: %s \n", movie[n].description);
printf("Rating: %.1f/5.0 \n", movie[n].rating);
printf("Ticket Price: Rs.%d \n", movie[n].ticketPrice);

input:
printf("\n0: Back \n1: Buy \n");
scanf("%d", &input);

if (input == 0)
{
LoadMenu();
}
else if (input == 1)
{
BuyTicket(n);
}
else
{
printf("Invalid, try again \n");
goto input;
}
}

void LoadMenu()
{
clrscr();
int i, num;

printf("CURRENT MOVIES: \n");


for (i = 0; i < 5; i++)
{
printf("%d. %s \n", i+1, movie[i].title);
}
movieNum:
printf("\n0: Exit \n[1-5]: Movie Details \n");
scanf("%d", &num);

if ((num < 0) || (num > 5))


{
printf("Invalid, try again \n");
goto movieNum;
}

if (num == 0)
{
exit(0);
}

LoadMovie(num);
}

void BuyTicket(int n)
{
clrscr();
int tickets, input;

printf("Price per ticket: Rs.%d \n", movie[n].ticketPrice);


ticketNum:
printf("No. of tickets: ");
scanf("%d", &tickets);

if (tickets < 1)
{
printf("Invalid, try again \n");
goto ticketNum;
}

printf("Price (%d Tickets): %d \n", tickets, movie[n].ticketPrice * tickets);


printf("\n0: Back \n1: Confirm \n2: Change Number of Tickets \n");
scanf("%d", &input);

if (input == 0)
{
LoadMovie(n);
}
else if (input == 1)
{
printf("\nSuccessfully Purchased %d Tickets for %s \n", tickets, movie[n].title);
printf("Press any key to continue \n");
getch();
LoadMenu();
}
else if (input == 2)
{
goto ticketNum;
}
}

7
7.0 Outputs of the Micro-Projects:-

8
9
8.0 Application of this Micro-Project

The above code serves as a foundational example for building a console-based movie ticket booking
system in C. Here's how the code can be applied in various contexts:

Local Movie Theaters: Small, independent movie theaters that don't have complex ticket booking
systems can use this code as a starting point to develop their own ticket booking software.

Educational Purposes: Students learning C programming can use this code as a project to understand
concepts like arrays, structures, loops, and user input/output handling.

Prototype Development: Software development teams working on larger movie ticket booking
applications can use this code as a prototype or proof-of-concept to demonstrate the basic functionality
before implementing more advanced features.

Learning Resource: Programming tutors or instructors can use this code as a teaching tool to illustrate
software development concepts and best practices in C programming.

Hackathons or Coding Competitions: Participants in hackathons or coding competitions focused on


creating small-scale applications can use this code as a starting point and extend it with additional features
within the time constraints of the event.

Open Source Contributions: Developers interested in contributing to open-source projects related to


movie ticket booking or similar domains can fork this code, enhance it with new features or improvements,
and contribute back to the community.

Personal Projects: Hobbyists or enthusiasts interested in software development can use this code as
inspiration to build their own movie ticket booking system for personal use or as part of a portfolio project

9.0 References

www.geeksforgeeks.org,Chatgpt,google

10
Suggested Rubric for Assessment of Micro-Project

S. Characteristic Poor Average Good Excellent


No. to be assessed ( Marks 1 - 3 ) ( Marks 4 - 7 ) ( Marks 8 - 11 ) ( Marks 12- 15 )

1 Relevance to Relate to Related to Take care of at- Take care of


the course very few some LOs least one CO more than one
LOs CO

2 Literature Not more At-least 5 At –least 7 About 10


review than two relevant relevant sources, relevant
/information sources sources, at most latest sources, most
collection very old least 2 latest latest
reference

3 Completion of Completed Completed Completed 60 to Completed


the Target as less than 50% 50 to 60% 80% more than 80
per %
project proposal

4 Analysis of Data neither Sufficient Sufficient and Enough data


Data and organized and appropriate collected and
representation nor appropriate enough data sufficient and
presented enough data generated presenting data.
well generated which is
but not organized and
organized but not used.
and not
presented well.

5 Quality of Incomplete Just Well assembled Well


Prototype/Model Programmi assembled and functioning assembled
ng code and some parts. But no with proper
codeis not creativity in functioning
functioning design and use of parts..
well. graphics function Creativity in
design and use
of graphics
function

6 Report Very short, Nearly Detailed, correct Very detailed,


Preparation Details sufficient and and clear correct, clear
about correct description of description of
methods, details about methods and methods, and
and methods, Conclusions. conclusions.
conclusion and Sufficient
s conclusion. Graphic
omitted, but clarity is Description.
some not there in
details are presentation.

7 Presentation Major Includes Includes major Well


of the micro information major information and organized,
project is not information well organized includes
included, but not well but not major
information organized presented well information ,w
is not well and not ell presented
organized. presented
well

8 Defense Could not Replied to Replied properly Replied most


reply to considerable to considerable of the
considerable number of number of questions
number of questions question. properly
question. but not
very
properly

12

Micro Project Evaluation Sheet


Name of Student : Amaan Kazi Enrollment No:23150920711
Name of Program: Computer Engineering Semester: Second
Course Title: PROGRAMMING IN C Course Code: 312303

Title of the Micro-Project : DESIGN MOVIE TICKET BOOKING.

Cos addressed by Micro Project: (Tick appropriate COs)


CO1 - Develop C program using input - output functions and arithmetic expressions.
CO2 - Develop C program involving branching and looping statements
CO3 - Implement Arrays and structures using C programs
CO4 - Develop C program using user-defined functions
CO5 - Write C program using pointer

Sr. Characteristic to be Poor Average Good Excellent Sub Total


No assessed ( Marks 1- (Marks 4-7 ) (Marks 8-11) (Mark 12-15)
3)

1 Relevance to the course

2 Literature review/
Information Collection

3 Completion of the Target


as per project proposal

4 Analysis of Data and


representation

5 Quality of Prototype/Model

6 Report Preparation

7 Presentation(5m)

8 Defense/Viva(5m)

Roll No. Process and Product Individual Viva (5 Marks) Total Marks
Assessment (15 Presentation 25
Marks) (5 Marks)

58

Name and designation of the Teacher:


MR.TEJAS SHAH
Dated Signature:

14

You might also like