Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

ICE CREAM Parlor Management System in C Project Report, Translations of C programming

ICE CREAM Parlor Management System in C Project Report

Typology: Translations

2022/2023

Uploaded on 04/26/2023

md-noor-1
md-noor-1 🇮🇳

1 document

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Ice-cream Parlor Management System
Final Report Of Computer programming
Group Members
S.no
Roll no.
Name
Reg no.
1
37
Md Arshad Noor
12204331
2
3
4
Submitted By : Md Arshad Noor
Submitted to : Aqsa Sayeed
Acknowledgement
I would like to express my gratitude to all those who have contributed to the successful completion of
my CSE101 Computer Programming final project report.
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download ICE CREAM Parlor Management System in C Project Report and more Translations C programming in PDF only on Docsity!

Ice-cream Parlor Management System

Final Report Of Computer programming

Group Members

S.no Roll no. Name Reg no.

1^37 Md Arshad Noor^12204331

Submitted By : Md Arshad Noor

Submitted to : Aqsa Sayeed

Acknowledgement

I would like to express my gratitude to all those who have contributed to the successful completion of

my CSE101 Computer Programming final project report.

First and foremost, I would like to thank my instructor for providing me with the knowledge and

guidance needed to complete this project. Their unwavering

support and constructive feedback have been invaluable throughout the process.

I am also grateful to my classmates, for their continuous encouragement, insightful discussions, and

collaboration during the project.

Furthermore, I would like to extend my appreciation to the resources provided by the University, such

as the computer lab facilities, online libraries, and tutorials, which have enabled me to gain a deeper

understanding of the programming concepts and tools.

Lastly, I would like to express my heartfelt thanks to my family and friends for their love,

encouragement, and motivation throughout my academic journey. Their unwavering support has

been instrumental in helping me achieve my goals.

Thank you all once again.

Introduction The Ice-cream Parlor Management System is a desktop application that allows the user to manage the di erent types of ice creams. The application allows the user to create a database of ice creams and perform various operations on the ice cream records. The user can display the list of ice creams, add new ice cream data, update the records of the ice creams, search for a specific ice cream, and delete any ice cream record. Modules

Display Ice-cream List:

The Display Ice-cream List module enables the user to view the list of all the ice

creams in the database. The list contains details such as the name of the ice

cream, its price, and the quantity available.

Add New Ice-cream Data:

The Add New Ice-cream Data module allows the user to add a new ice cream

record to the database. The user can enter details such as the name of the ice

cream, its price, and the quantity available.

Program Source Code #include <stdio.h> #include <string.h> #define MAX_FLAVORS 10 typedef struct flavor { char name [ 20 ]; int stock; } Flavor; Flavor flavors [MAX_FLAVORS]; int num_flavors = 0 ; void add_flavor ( char * name , int stock ) {

if (num_flavors == MAX_FLAVORS) {

printf ( "Maximum number of flavors reached. \n " ); return ; } for ( int i = 0 ; i < num_flavors; i ++ ) { if ( strcmp ( flavors [i]. name , name) == 0 ) { printf ( "Flavor already exists. \n " ); return ; } } Flavor new_flavor; strcpy ( new_flavor. name , name); new_flavor. stock = stock; flavors [num_flavors] = new_flavor; num_flavors ++ ; printf ( "Flavor added successfully. \n " ); } void remove_flavor ( char * name ) { for ( int i = 0 ; i < num_flavors; i ++ ) { if ( strcmp ( flavors [i]. name , name) == 0 ) { for ( int j = i; j < num_flavors - 1 ; j ++ ) { flavors [j] = flavors [j + 1 ]; } num_flavors -- ; printf ( "Flavor removed successfully. \n " ); return ; } } printf ( "Flavor not found. \n " ); } void print_flavors () {

printf ( "Flavors available: \n " ); for ( int i = 0 ; i < num_flavors; i ++ ) { printf ( "%s - %d \n " , flavors [i]. name , flavors [i]. stock ); } } int main () {

int choice, stock; char name [ 20 ]; do { printf ( " \n 1. Add flavor \n " ); printf ( "2. Remove flavor \n " ); printf ( "3. View available flavors \n " ); printf ( "4. Exit \n " ); printf ( "Enter your choice: " ); scanf ( "%d" , & choice); switch (choice) { case 1 : printf ( "Enter flavor name: " ); scanf ( "%s" , name); printf ( "Enter stock: " ); scanf ( "%d" , & stock ); add_flavor (name, stock); break ; case 2 : printf ( "Enter flavor name: " ); scanf ( "%s" , name); remove_flavor (name); break ; case 3 : print_flavors (); break ; case 4 : printf ( "Exiting... \n " ); break ; default : printf ( "Invalid choice. \n " ); break ; } } while (choice != 4 );

return 0 ; }

Thank You