SlideShare a Scribd company logo
1 of 26
COMPUTER
SCIENCE
PROJECT
CANTEEN
MANAGEMENT
ACKNOWLEDGEMENT
I would like to express a deep sence of
thanks and gratitude to my project guide
Mr. VIMAL SHARMA Sir for guiding me
immensely through the course of this
project. He always evinced keen interest
in my work. His constructive advice and
constant motivation have been
responsible for the completion of this
project.
OMKAR MAJUKAR
XII-A
CONTENTS
1. FILES GENERATED
2. WORKING DESCRIPTION
3. HEADER FILES USED
4. OUTPUT SCREENSHOTS
5. BIBLIOGRAPHY
FILES GENERATED
1. DATA FILES
CANTEEN.DAT
2. PROGRAM FILE
CANTEEN MANAGEMENT.CPP
3. OBJECT FILE
CANTEEN.OBJ
4. EXECUTION FILE
CANTEEN MANAGEMENT.EXE
WORKING DESCRIPTION
This program consists of options as follows
MAIN MENU
1. ADD CUSTOMER
2. ADMINISTRATOR MENU
 ADD PRODUCT
 DISPLAY ALL PRODUCTS
 PRODUCT DETAILS
 MODIFY PRODUCT
 DELETE PRODUCT
 VIEW PRODUCT MENU
 RETURN TO MAIN MENU
3. EXIT
//***************************************************************
// HEADER FILES USED IN PROJECT
//****************************************************************
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
//***************************************************************
// CLASS USED
//****************************************************************
class product
{
int pno;
char name[50];
float price,qty,tax;
public:
void add_product()
{
cout<<"nPlease Enter The Product No.of The Product : ";
cin>>pno;
cout<<"nnPlease Enter The Name ofThe Product : ";
gets(name);
cout<<"nPlease Enter The Price ofThe Product : ";
cin>>price;
}
void show_product()
{
cout<<"nThe Product No. of The Product : "<<pno;
cout<<"nThe Name ofThe Product : ";
puts(name);
cout<<"nThe Price of The Product : "<<price;
}
int retpno()
{
return pno;
}
float retprice()
{
return price;
}
char* retname()
{
return name;
}
}; // CLASS ENDS HERE
//***************************************************************
// GLOBAL DECLARATION FOR STREAM OBJECT
//****************************************************************
fstream fp;
product pr;
//***************************************************************
// FUNCTION TO WRITE IN THE FILE
//****************************************************************
void write_product()
{
fp.open("Canteen.dat",ios::out|ios::app);
pr.add_product();
fp.write((char*)&pr,sizeof(product));
fp.close();
cout<<"nnThe Product Has Been Added ";
getch();
}
//***************************************************************
// FUNCTION TO READ ALL RECORDS FROM FILE
//****************************************************************
void display_all()
{
clrscr();
cout<<"nnnttDISPLAYALL RECORDnn";
fp.open("Canteen.dat",ios::in);
while(fp.read((char*)&pr,sizeof(product)))
{
pr.show_product();
cout<<"nn====================================n";
getch();
}
fp.close();
getch();
}
//***************************************************************
// FUNCTION TO READ SPECIFIC RECORD FROM FILE
//****************************************************************
void display_sp(int n)
{
int flag=0;
fp.open("Canteen.dat",ios::in);
while(fp.read((char*)&pr,sizeof(product)))
{
if(pr.retpno()==n)
{
clrscr();
pr.show_product();
flag=1;
}
}
fp.close();
if(flag==0)
cout<<"nnSorry !!! Recordnot exist";
getch();
}
//***************************************************************
// FUNCTION TO MODIFY RECORD OF FILE
//****************************************************************
void modify_product()
{
int no,found=0;
clrscr();
cout<<"nntMODIFYPRODUCT";
cout<<"nntPlease Enter The Product Number : ";
cin>>no;
fp.open("Canteen.dat",ios::in|ios::out);
while(fp.read((char*)&pr,sizeof(product)) && found==0)
{
if(pr.retpno()==no)
{
pr.show_product();
cout<<"nPlease Enter The NewDetails of Product"<<endl;
pr.add_product();
int pos=-1*sizeof(pr);
fp.seekp(pos,ios::cur);
fp.write((char*)&pr,sizeof(product));
cout<<"nnt RecordUpdatedSuccessfuly";
found=1;
getch();
}
}
fp.close();
if(found==0)
cout<<"nnSorry !!! RecordNot Found ";
getch();
}
//***************************************************************
// FUNCTION TO DELETE A PRODUCT
//****************************************************************
void delete_product()
{
int no;
clrscr();
cout<<"nnnnDELETE PRODUCT";
cout<<"nnPlease Enter The product no. of The Product You Want To
Delete : ";
cin>>no;
fp.open("Canteen.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&pr,sizeof(product)))
{
if(pr.retpno()!=no)
{
fp2.write((char*)&pr,sizeof(product));
}
}
fp2.close();
fp.close();
remove("Canteen.dat");
rename("Temp.dat","Canteen.dat");
cout<<"nntRecordDeletedSuccessfully ...";
getch();
}
//***************************************************************
// FUNCTION TO DISPLAY THE PRICE LIST
//****************************************************************
void menu()
{
clrscr();
fp.open("Canteen.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!!FILE COULD NOTBE OPENnnnFirst Add A
Product";
cout<<"nnnProgram is closing ....";
getch();
exit(0);
}
cout<<"nnttProduct MENUnn";
cout<<"==================================================
==n";
cout<<"P.NO.ttNAMEttPRICEn";
cout<<"==================================================
==n";
while(fp.read((char*)&pr,sizeof(product)))
{
cout<<pr.retpno()<<"tt"<<pr.retname()<<"tt"<<pr.retprice()<<endl
;
}
fp.close();
}
//***************************************************************
// FUNCTION TO PLACE ORDER AND MAKE BILL
//****************************************************************
void place_order()
{
int order_arr[50],quan[50],c=0;
float amt,total=0;
char ch='Y';
menu();
cout<<"n============================";
cout<<"n PLACE YOUR ORDER";
cout<<"n============================n";
do
{
cout<<"nnEnter The Product No.Of The Product : ";
cin>>order_arr[c];
cout<<"nEnter The Quantity : ";
cin>>quan[c];
c++;
cout<<"nDo You Want To Order More Products ? (y/n) : ";
cin>>ch;
}
while(ch=='y' ||ch=='Y');
cout<<"nn******************************** BILL
************************n";
for(int x=0;x<=c;x++)
{
fp.open("Canteen.dat",ios::in);
fp.read((char*)&pr,sizeof(product));
while(!fp.eof())
{
if(pr.retpno()==order_arr[x])
{
amt=pr.retprice()*quan[x];
cout<<"nProduct Number : "<<order_arr[x]
<<"nProduct Name : " <<pr.retname() <<"nQuantity : "<<quan[x]
<<"nPrice : " <<pr.retprice();
total=amt;
}
fp.read((char*)&pr,sizeof(product));
}
fp.close();
}
cout<<"nntttttTOTAL="<<total;
cout<<"nnnnTHANK YOU FOR PLACINGORDER";
getch();
}
//***************************************************************
// ADMINISTRATOR MENU FUNCTION
//****************************************************************
void admin_menu()
{
clrscr();
char ch2;
cout<<"nnntADMINISTRATORMENU";
cout<<"nnt1.ADDPRODUCT";
cout<<"nnt2.DISPLAYALL PRODUCTS";
cout<<"nnt3.PRODUCTDETAILS ";
cout<<"nnt4.MODIFYPRODUCT";
cout<<"nnt5.DELETE PRODUCT";
cout<<"nnt6.VIEWPRODUCTMENU";
cout<<"nnt7.BACK TO MAIN MENU";
cout<<"nntPlease Enter Your Choice (1-7) ";
ch2=getche();
switch(ch2)
{
case '1': clrscr();
write_product();
break;
case '2': display_all();
break;
case '3': int num;
clrscr();
cout<<"nntEnter The Product No : ";
cin>>num;
display_sp(num);
break;
case '4': modify_product();
break;
case '5': delete_product();
break;
case '6': menu();
getch();
case '7':
break;
default:
cout<<"a";
admin_menu();
}
}
//***************************************************************
// THE MAIN FUNCTION
//****************************************************************
void main()
{
char ch;
do
{
clrscr();
cout<<"nnn*******************************CANTEEN
MANAGEMENT*******************************";
cout<<"nnntMAIN MENU";
cout<<"nnt01.CUSTOMER";
cout<<"nnt02.ADMINISTRATOR MENU";
cout<<"nnt03.EXIT";
cout<<"nntPlease Select Your Option(1-3) : ";
ch=getche();
switch(ch)
{
case '1': clrscr();
place_order();
getch();
break;
case '2':admin_menu();
break;
case '3':cout<<"nnThank You Visit Again...";
cout<<"nnMADE BY : OMKAR MAJUKAR";
cout<<"nnSCHOOL: KENDRIYAVIDYALAYA NO2
BELGAUM CANTT";
getch();
exit(0);
default :cout<<"a";
}
}
while(ch!='3');
}
//***************************************************************
// END OF PROJECT
//***************************************************************
OUTPUT SCREENSHOTS
1. WELCOME SCREEN
2. PLACE ORDER
3. ADMINISTRATOR MENU
4. ADD PRODUCT
5. DISPLAYALL PRODUCTS
6. PRODUCT DETAILS
7. MODIFY PRODUCT
8. DELETE PRODUCT
9. VIEW PRODUCT MENU
10. EXIT
BIBLIOGRAPHY
BOOK REFERRED
 COMPUTER SCIENCE WITH C++ BY SUMITA ARORA
 OBJECT ORIENTED PROGRAMMING BY ROBERT LAFORE

More Related Content

What's hot

ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...
ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...
ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...
Amir Mohamed Ali
 

What's hot (20)

Online Restaurant Management System
Online Restaurant Management SystemOnline Restaurant Management System
Online Restaurant Management System
 
Daily Expense Tracker BSc.CSIT Project Nepal
Daily Expense Tracker BSc.CSIT Project NepalDaily Expense Tracker BSc.CSIT Project Nepal
Daily Expense Tracker BSc.CSIT Project Nepal
 
ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...
ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...
ITX3999 - Restaurant Management System Disseration.compressed (1)-ilovepdf-co...
 
Development of Food Delivery App
Development of Food Delivery AppDevelopment of Food Delivery App
Development of Food Delivery App
 
Canteen Store Department
Canteen Store DepartmentCanteen Store Department
Canteen Store Department
 
Restaurant Management System
Restaurant Management SystemRestaurant Management System
Restaurant Management System
 
Online food project
Online food projectOnline food project
Online food project
 
Super marketbillingsystemproject
Super marketbillingsystemprojectSuper marketbillingsystemproject
Super marketbillingsystemproject
 
Food delivery application report
Food delivery application reportFood delivery application report
Food delivery application report
 
Canteen management system Documentation
Canteen management system DocumentationCanteen management system Documentation
Canteen management system Documentation
 
restaurant billing system
restaurant billing system restaurant billing system
restaurant billing system
 
Project report on (atm MAnagment system)
Project report on (atm MAnagment system)Project report on (atm MAnagment system)
Project report on (atm MAnagment system)
 
main report on restaurant
main report on restaurantmain report on restaurant
main report on restaurant
 
Online Food Ordering System
Online Food Ordering SystemOnline Food Ordering System
Online Food Ordering System
 
Canteen management system
Canteen management systemCanteen management system
Canteen management system
 
PROJECT REPORT
PROJECT REPORTPROJECT REPORT
PROJECT REPORT
 
iOder (Food Ordering System)
iOder (Food Ordering System)iOder (Food Ordering System)
iOder (Food Ordering System)
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
 
HDFC banking system SRS Document
HDFC banking system  SRS DocumentHDFC banking system  SRS Document
HDFC banking system SRS Document
 
Canteen management system
Canteen management systemCanteen management system
Canteen management system
 

Similar to Canteen management

Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxInstruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
carliotwaycave
 

Similar to Canteen management (20)

Supermarket
SupermarketSupermarket
Supermarket
 
computer project on shopping mall..cbse 2017-2018 project
computer project on shopping mall..cbse 2017-2018 projectcomputer project on shopping mall..cbse 2017-2018 project
computer project on shopping mall..cbse 2017-2018 project
 
Computer
ComputerComputer
Computer
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdf
 
Sunil
SunilSunil
Sunil
 
Durgesh
DurgeshDurgesh
Durgesh
 
Store management along with output
Store management along with outputStore management along with output
Store management along with output
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Using Pin++ to Author Highly Configurable Pintools for Pin
Using Pin++ to Author Highly Configurable Pintools for PinUsing Pin++ to Author Highly Configurable Pintools for Pin
Using Pin++ to Author Highly Configurable Pintools for Pin
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
Hyper market management system project +2 computer science
Hyper market management system   project +2 computer scienceHyper market management system   project +2 computer science
Hyper market management system project +2 computer science
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communication
 
Puppet Performance Profiling
Puppet Performance ProfilingPuppet Performance Profiling
Puppet Performance Profiling
 
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxInstruction1. Please read the two articles. (Kincheloe part 1 &.docx
Instruction1. Please read the two articles. (Kincheloe part 1 &.docx
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul Patel
 
Final Project Presentation
Final Project PresentationFinal Project Presentation
Final Project Presentation
 
Weapons for Boilerplate Destruction
Weapons for Boilerplate DestructionWeapons for Boilerplate Destruction
Weapons for Boilerplate Destruction
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 

Canteen management