68
COMPUTER SCIENCE PROJECT Ashwin Francis 2014-2015

12th CBSE Computer Science Project

Embed Size (px)

Citation preview

Page 1: 12th CBSE Computer Science Project

COMPUTER SCIENCE PROJECT

Ashwin Francis

2014-2015

Page 2: 12th CBSE Computer Science Project
Page 3: 12th CBSE Computer Science Project

Objective of C++ Projects on Canteen Management System

This is C++ Projects on Canteen Management System, which provided a lot of facility to their user.

The objective and scope of my Project Canteen Management System is to record the details various activities of user. It will simplifies the task and reduse the paper work. During implementation every user will be given appropriate training to suit their specific needs. Specific support will also be provided at key points within the academic calendar. Training will be provided on a timely basis, and you will be trained as the new is Canteen Management System rolled out to your area of responsibility.

At the moment we are in the very early stages, so it is difficult to put a specific time on the training, but we will keep people informed as plans are developed.The system is very user friendly and it is anticipated that functions of the system will be easily accessed by administrators, academics, students and applicants.

Hence the management system for the College management has been designed to remove all the deficiency from which the present system is suffering and to ensure.

Abstract of Canteen Management System

The client uses MS Excel, and maintains their records, however it is not possible them to share the data from multiple system in multi user environment, there is lot of duplicate work, and chance of mistake. When the records are changed they need to update each and every excel file. There is no option to find and print previous saved records. There is no security; any body can access any report and sensitive data, also no reports to summary report. This Canteen Management System is used to overcome the entire problem which they are facing currently, and making complete atomization of manual system to computerized system.

The main limitation of the previous system of Canteen Management System:

The existing system only provides text-based interface, which is not as user-friendly as Graphical user Interface.

Since the system is implemented in Manual, so the response is very slow. The transactions are executed in off-line mode, hence on-line data capture and modification is not

possible. Off-line reports cannot be generated due to batch mode execution.

Hence, there is a need of reformation of the system with more advantages and flexibility. The Canteen Management System eliminates most of the limitations of the existing software. It has the following objectives:

Enhancement:

The main objective of Canteen Management System is to enhance and upgrade the existing system by increasing its efficiency and effectiveness. The software improves the working methods by replacing the existing manual system with the computer-based system.

Automation:

The Canteen Management System automates each and every activity of the manual system and increases its throughput. Thus the response time of the system is very less and it works very fast.

Accuracy:

Introduction to Project

Page 4: 12th CBSE Computer Science Project

The Canteen Management System provides the uses a quick response with very accurate information regarding the users etc. Any details or system in an accurate manner, as and when required.

User-Friendly:

The software Canteen Management System has a very user-friendly interface. Thus the users will feel very easy to work on it. The software provides accuracy along with a pleasant interface.Make the present manual system more interactive, speedy and user friendly.

Availability:

The transaction reports of the system can be retried as and when required. Thus, there is no delay in the availability of any information, whatever needed, can be captured very quickly and easily.

Maintance Cost:

Reduce the cost of maintenance.

PROJECT CATEGORY: Relational Database Management System (RDBMS)

The project is entitled “Canteen Management System”,category “RDBMS”. Hence before discussing any thing about the project Canteen Management System, a brief disscussion of related basic concept is necessary.

As a software developer or as a programmer,we are expected to design and develope any program that works correctly, efficiently and the time is easy to be used by every person, who may or may not be well versed wiht computer and its capabilities.The Project is based on the Canteen Management System, Being the Information System it requires extensive use of some Data base Management System to store, manipulate and handle the huge and complex record, In RDBMS we can act various attributes with the database like editing the records, Modifications Deletions of the records, View the records in various formats, listing the database etc. Project can be categorized by their functioning and relation with their database and other tools can categorize project. Since this project has been developed based on the Relation Data Base Management System So Proposed system comes under RDBMS (Relational Database Management System) category, as there is need to store and manipulate a huge amount of data related to patients as per various queries.

SYSTEM DESIGN(Introduction)

The systems objectives outlined during the feasibility study serve as the basic from which the work of system design is initiated. Much of the activities involved at this stage is of technical nature requiring a certain degree of experience in designing systems, sound knowledge of computer related technology and through understanding of computers available in the market and the various facilities provided by the vendors. Nevertheless, a system cannot be designed in isolation without the active involvement of the user. The user has a vital role to play at this stage too. As we know that data collected during feasibility study wills we utilized systematically during the system design. It should, however be kept in mind that detailed study of the existing system is not necessarily over with the completion of the feasibility study. Depending on the plan of feasibility study, the level of detailed study will vary and the system design stage will also vary in the amount of investigation that still needs to be done. This investigation is generally an urgent activity during the system. Sometimes, but rarely, this investigation may form a separate stage between feasibility study and computer system design. Designing a new system is a creative process, which calls for logical as will as lateral thinking. The logical approach involves systematic moves towards the end product keeping in mind the capabilities of the personnel and the equipment at each decision making step. Lateral thought implies encompassing of ideas beyond the

Page 5: 12th CBSE Computer Science Project

usual functions and equipment. This is to ensure that no efforts are being made to fit previous solutions into new situations.

System Design Considerations

The system design process is not a step-by-step adherence of clear procedures and guidelines. Though, certain clear procedures and guidelines have emerged in recent days,But still much of design work depends on knowledge and experience of the designer.When designer starts working on system design, he will face different type of problems. Many of these will be due to constraints imposed by the user or limitations of the hardware and software available in the market. Sometimes, it is difficult to enumerate the complexity of the problems and solutions there of since the variety of likely problems is so great and no solutions are exactly similar. However, following considerations should be kept in mind during the system designing phase:

Design Objectives

The primary objective of the design of course, is to deliver the requirements as specified in the feasibility reports. In general the following design objectives should be kept in mind.

Practicality

The system must be stable and can be operated by people with average.

Efficiency

This involves accuracy, timeliness and comprehensiveness to the system output.

Cost

It is desirable to aim for a system with a minimum cost subject to the condition that it must satisfy all the requirements.

Flexibility

The system should be modifiable depending on the changing needs of the user. Such modifications should not entail extensive reconstructing or recreation of software. It should also be portable to different computer systems.

Security

This is very important aspect of the design and should cover areas of hardware reliability, fall back procedures, physical security of data and provision for detection of fraud and abuse.System design involves first logical design and then physical construction of the system. The logical design describes the structure and characteristics of features, like the outputs, inputs, files, database and procedures. The physical construction, which follows the logical design, produces actual program software, files and a working system.

Major System Design Activities

Several development activities are carried out during structured design. They are database design, implementation planning, system test preparation, system interface specification, and user documentation.

Page 6: 12th CBSE Computer Science Project

Database design

This activity deals with the design of the physical database. A key is to determine how the access paths art to be implemented.Program design: In conjunction with database design is a decision on the programming language to be used and the flowcharting, coding, and debugging procedure prior to conversion. The operating system limits the programming languages that will run of the system.System and program test preparation. Each aspect of the system has a separate test requirement. System testing is done after all programming and testing completed the test on system and program test requirements become a part of design specifications a prerequisite to implementation.

In contrast to the system testing is acceptance testing, which puts the system through a procedure design to convince the user that the proposed system will meet the stated requirements. Acceptance testing is technically similar to system testing but politically it is different.

Design Process

The computer system design process is an exercise of specifying how, the system will work. It is an iterative process, which is based on what the system will be do as shown in the feasibility report.Mainly, following five parts have been included in the system design process

Output Design

The starting point of the design process is the proper knowledge of system requirements which will normally be converted in terms of output.

Input Design

Once the output requirements have been finalized, the next step is to find out what data need to be made available to the system to produce the desired outputs. The basic documents in which these data are available need to be identified. If necessary, these documents may have to be revised or new documents may have to be introduced.

File Design

Once the input data is captured in the system, these may to be preserved either for a short or long period. These data will generally be stored in files in a logical manner. The designer will have to devise the techniques of storing and retrieving data from these files.

Procedure Design

This step involves specifications of how processing will be performed. In this, there are two aspects:

Computer Procedure

The computer procedure will specify what functions will be carried out on computer, what will be different programs and in what sequence the programs will be run.

Non-computer procedure

The non-computer procedure will specify the manual procedures for feeding input data, receiving outputs etc.

Page 7: 12th CBSE Computer Science Project

Control Design

The control design indicates necessary procedures which will ensure correctness of processing, accuracy of data, timely output etc. this will ensure that the system is functioning as per plan.

Development and Deployment Design

Major responsibilities include system Requirement Study, Preparing System Design Document, Preparing the Program (Form) Specs, Peer Review of the Specs, Implement Quality procedures as per the QMS Document, Documentation of SRS Revalidation & Design Documents, thorough grasping of the user functionality and applying, approving the same in the project, Developing, Testing & Debugging of Forms, User Training and Implementation of the module.

INPUT DESIGN(Introduction)

Once the analysis and design of the system has been done, it would be necessary to identify the data that are required to be processed to produce the outputs. Input is one of the most expensive phases of the operation of a computerized system and creates sometimes a major problem. Different type of problem with a system can usually be traced back to faulty input design method needless to say, therefore, that the input data are the lifeblood of a system and have to be analyzed and designed with utmost care and consideration. Input design features can ensure the reliability of the system and generate correct reports form the accurate data. The input design also determines whether the user can interact efficiently with the system.

Elements of Input Data

Inaccurate input data are the most common cause of errors in data processing. Errors entered by data entry operators can be controlled by input design. Input data are collected and organized into groups of similar data. Once identified, appropriate input media are selected for processing.

Input Data

The goal of designing input data is to make data entry as easy, logical and error free from errors as possible. In entering data, operators need to know the following:

The allocated space for each field. Field sequence, which much match that in the source document. The format in which data fields are entered for example, filling out the date field is required through the

edited format mm/dd/yy. When we approach input data design, we design the source document. Let us elaborate on each step.

Source Documents

Source data are captured initially on original paper or a source document. For example, a cheque written against an account is a source document. When it reaches the bank, it is encoded with special magnetic ink character recognition so that a reader that is part of the information system of the bank can process it. Therefore, source documents initiate a processing cycle as soon as they are entered into the system. Source documents may be entered into the system from punch cards, from diskettes, or even directly through the keyboard.

A source document should be logical and easy to understand. Each area in the form should be clearly identified and should specify for the user what to write and where to write it.A source document may or may not be retained in the proposed system. Thus, each source document may be evaluated in terms of.Its continued use in the proposed system,The extent of modification for the proposed system & Replacement by an alternative source document.

Page 8: 12th CBSE Computer Science Project

Input Design Guidelines

The design of input play very significant role in getting the correct output. It covers al phases of input from creation of initial data (original recording) to actual entering the data to the system for processing. The input design is the link that ties the information system into the world of its users. Some features of design may vary depending on whether the system is batch-oriented or on-line. Here, we will discuss the various objectives of input design. They focus on:

Controlling amount of input Avoiding delay Avoiding errors in data Avoiding extra steps Keeping the process simple

Each of the five objectives of input design is briefly discussed below:

Controlling Amount of Data

An effective design controls the quantity of data for input for the following reasons:Firstly, data preparation and data entry operations depend on people. Since labor costs are high, the cost or preparing and entering data is also high. It is quite evident, then that reducing data requirements mean lowering costs through reduced labor expense.Secondly, the input phase of computing can be slow process and take many times longer than that needed by computers to carry out their tasks. In fact, the computer itself may sit idle until data is prepared and input for processing. By reducing input requirements, the analyst will speed the entire process from data capture to processing to provide result to users.

Avoiding Delay

When processing is delayed owing to data preparation or data entry, the cause is called a bottleneck. Avoid bottlenecks when designing input should always be one of the objectives of the analyst.

Avoiding Errors in Data

The third objective deals with errors. In one sense, the rate at which errors occur is dependent on the quantity of data. Since the lower the amount of data is inputted, there are fewer opportunities for the error to occur.Firstly, the analyst can reduce this number by reducing the volume of data dust must be entered for each transaction.Secondly, the analyst can also affect error rates of an operation through design. The manner in which data must be entered can reduce the chance of errors.Still, a third aspect of error control is the need to detect errors when they do occur. Checks and balances in the data entry programs, called input validation techniques, also detect errors input.

OUTPUT DESIGN (Introduction)

Presenting the data processed by a computer-based information system in an attractive and usable form has become very essential these days’ success and acceptance of a system to some extent depends on good presentation. Therefore, system analyst must know fully how to design output report in an attractive way. Many new output devices are being introduced in the market because of recent development in computer technology. System analyst must be aware of these new technologies and try to use these new output devices if possible. Currently, excellent graphic displays are widely available. Speech output systems are also fast emerging.

There are three main reasons why outputs from the computer are required. They are:

Page 9: 12th CBSE Computer Science Project

For communication to the persons concerned. For re-input to the computer for being connected with other data and further processing. For permanent storage.

Types of Output:

Outputs of a system can take different forms. The most common are reports, displays on screen, printed forms etc. the outputs also vary in terms of their contents, type of stationery. Frequency and timing etc. besides, due consideration also need to be given as to who will use the output and for what purpose. All these points must be kept in mind while designing outputs so that the objectives of the system are met in the best possible way.

Outputs of a data-processing system can be placed into two categories:

Application Output Operating Output

Application Output

These are the outputs desired out of the system to meet its objectives. These are of three types:

Output as a basis for decision-making. This type of output is generally required by management for decision-making purposes.

Output as a requirement to meet a functional objective. Invoices, Excise Gate Pass, Purchase Orders are the examples of such output.

Statutory outputs: All organization is required to produce a certain amount of reports and forms as required by law.Operating Output

These outputs are mainly generated for use of EDP staff and give various indications as to how the system operates. System logs, error messages, status indicators etc. are the examples of such output. These types of output are not concerned for the users.

SCOPE OF THE PROJECT

It may help collecting perfect management in details. In a very short time, the collection will be obvious, simple and sensible. It will help a person to know the management of passed year perfectly and vividly. It also helps in current all works relative to College. It will be also reduced the cost of collecting the management & collection procedure will go on smoothly.

The present project has been developed to meet the aspirations indicated in the modern age. An attempt has been made through this project to do all work ease & fast. It provide current add, Update, MoveNext, MovePrevious, MoveLast, Find & Delete all facilities to accomplish the desired objectives. The facility Include in this project and the suggested activities have been organized to impart knowledge & develop skill & attitude in the College official works.

Page 10: 12th CBSE Computer Science Project

#include <fstream.h> //for reading and writing files

#include <conio.h> //for clrscr()

#include <string.h> //for string characters

#include <stdio.h> //for gets and puts function

#include <iomanip.h> //for setw function

class consumer

{ int cno;

char cname[20]; char adress[20];

int a,b,c; float i;

public:

void entry();

void display();

int rcno();

void write();

void read();

void search();

void del();

void update();

};

void consumer::entry()

{

clrscr();

cout<<"ARMY CANTEEN\n";

cout<<"Customer ID :";

CODING

Page 11: 12th CBSE Computer Science Project

cin>>cno;

cout<<"Customer name :";

gets(cname);

cout<<"Customer adress :";

gets(adress);

cout<<"Customer Service number :";

cin>>a;

cout<<"Costumer Smart card number :";

cin>>b;

cout<<"Costumer Phone number :";

cin>>c;

cout<<"Customer Bill number :";

cin>>i;

}

void consumer::display()

{

cout<<"\n\n";

cout<<"Customer ID :";

cout<<cno;

cout<<"Customer name :";

puts(cname);

cout<<"Customer adress :"<<adress;

cout<<"Customer Service number :" <<a;

Page 12: 12th CBSE Computer Science Project

cout<<"Costumer Smart card number :"<<b;

cout<<"Costumer Phone number :"<<c;

cout<<"Customer Bill number :"<<i<<"\n";

}

int consumer::rcno()

{

return cno;

}

void consumer::write()

{ char ch;

consumer c;

fstream f1;

c.entry();

f1.open("main.dat",ios::app|ios::binary);

cout<<"\n\n\tDO you want to save the record(y/n)\t";

cin>>ch;

if(ch=='y')

{

Page 13: 12th CBSE Computer Science Project

f1.write((char*)&c,sizeof(c));

}

f1.close();

}

void consumer::read()

{

consumer c;

fstream f1;

f1.open("main.dat",ios::in|ios::binary);

while(!f1.eof())

{

f1.read((char*)&c,sizeof(c));

c.display();

if(f1.eof())

{

cout<<"\n\n End of the file reached\n\n";

}

}

f1.close();

}

void consumer::search()

{

Page 14: 12th CBSE Computer Science Project

consumer c;

int rn;

char found='n';

ifstream f1("main.dat",ios::in);

cout<<"\n\n Enter Customer ID you want to SEARCH :\t";

cin>>rn;

while(!f1.eof())

{

f1.read((char*)&c,sizeof(c));

if(c.rcno()==rn)

{

c.display();

found='y';

break;

}

}

if(found=='n')

cout<<"\n\n\tRECORD NOT FOUND!!!!!!!!!!!!!\n";

f1.close();

}

void consumer::del()

{

Page 15: 12th CBSE Computer Science Project

consumer c;

ifstream f1("main.dat",ios::in);

ofstream f2("temp.dat",ios::out);

int rno;

char found='f',confirm='n';

cout<<"\n\n Enter Customer ID you want to DELETE :\t";

cin>>rno;

while(!f1.eof())

{

f1.read((char*)&c,sizeof(c));

if(c.rcno()==rno)

{

c.display();

found='t';

cout<<"\n\n Are you sure want to DELETE this record ? (y/n)\t";

cin>>confirm;

if(confirm=='n')

f2.write((char*)&c,sizeof(c));

}

else

f2.write((char*)&c,sizeof(c));

}

if(found=='f')

cout<<"\n\n\tRECORD NOT FOUND\n";

f1.close();

Page 16: 12th CBSE Computer Science Project

f2.close();

remove("main.dat");

rename("temp.dat","main.dat");

f1.open("main.dat",ios::in);

clrscr();

cout<<"\n\n\n Now the file contains\n\n\n";

while(!f1.eof())

{

f1.read((char*)&c,sizeof(c));

if(f1.eof()) c.display();

}

f1.close();

}

void consumer::update()

{

consumer c;

fstream f1("main.dat",ios::in | ios::out | ios::binary);

int rno; long pos;

char found='f';

cout<<"\n\n Enter the Customer ID you want to MODIFY :\t";

cin>>rno;

while(!f1.eof())

{

pos=f1.tellg();

Page 17: 12th CBSE Computer Science Project

f1.read((char*)&c,sizeof(c));

if(c.rcno()==rno)

{

c.entry();

f1.seekg(pos);

f1.write((char*)&c,sizeof(c));

found='t';

break;

}

}

if(found=='f')

cout<<"\n\n\tRECORD NOT FOUND\n";

f1.seekg(0);

clrscr();

cout<<"\n Now the file contains\n\n";

c.display();

f1.close();

getch();

}

int main()

{

unsigned int sum,add,d,j,e,f,g,h,k,l,w,x,y,z,choice;

Page 18: 12th CBSE Computer Science Project

int abis=0,apep=0,aden=0,amun=0,aperk=0,acoc=0,atit=0,alux=0,atid=0,aree=0;

unsigned int m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;

int pend=0,print=0,graph=0,ram=0,hard=0,win=0,ant=0,p1=0,p2=0,g1=0,r1=0,h1=0,w1=0,an1=0,mo=0,mous=0,web=0,aweb=0,asc=0,scan=0,total=0;

char pu,str[10],yes,et;

consumer c1;

clrscr();

cout<<"\n\n\t\t\t ARMY CANTEEN MANAGEMENT\n\n\n\n\t\t\CREATED BY\n\t\t\tROHIT BHATI\n\t\t\tNAKUL BHATI\n\t\t\tDIVYANSHU";

cout<<"\nENTER PASSWORD PLEASE:\n";

gets(str);

if(strcmp(str,"army")!=0)

{

cout<<"\nINVALID KEY PROGRAM TERMINATED";

getch();

return 1;

}

else

{

clrscr();

cout<<" COMPUTER SCIENCE PROJECT WORK \n";

cout<<" \n";

cout<<"*****************************************************************************";

cout<<"\n";

Page 19: 12th CBSE Computer Science Project

cout<<" WELCOME TO THE ARMY CANTEEN \n";

cout<<"****************************************************************************\n";

cout<<"****************************************************************************\n";

again:

clrscr();

cout<<" \t\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$";

cout<<"\n\n\t\t\t* 1.NEW CUSTOMER *";

cout<<"\n\n\t\t\t* 2.DETAILS *";

cout<<"\n\n\t\t\t* 3.SEARCH A RECORD *";

cout<<"\n\n\t\t\t* 4.DELETE A RECORD *";

cout<<"\n\n\t\t\t* 5.MODIFY A RECORD *";

cout<<"\n\n\t\t\t* 6.DISPLAY ALL RECORDS *";

cout<<"\n\n\t\t\t* 7.QUANTITY AVAILABLE *";

cout<<"\n\n\t\t\t* 0.EXIT *\n";

cout<<"\n\t\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$";

cout<<"\n\n\n\n\t Enter your choice :\t";

cin>>d;

switch(d)

{

case 1: clrscr();

cout<<"\n\n\n\t\t\tARMY CANTEEN";

cout<<"\n\n\n\t\t\t COSUMER INFORMATION"; // TO ENTER THE DETAILS OF THE COSTUMER

Page 20: 12th CBSE Computer Science Project

c1.write(); // ITEMS AND THIER RATES

start:

cout<<"\n\n\nDO YOU WANT TO PURCHASE(Y/N):\n\n";

cin>>pu;

if(pu=='Y'||pu=='y')

{

clrscr();

items:

cout<<"\n\t\t\t\t*************";

cout<<"\n\t\t\t\tPURCHASE LIST";

cout<<"\n\t\t\t\t*************\n\n\n\n";

cout<<"\n\nPEPSODENT\t\t\t\t\t\t\t36";

cout<<"\n\nDENIM POWDER\t\t\t\t\t\t\t110 ";

cout<<"\n\nMUNCH\t\t\t\t\t\t\t\t8 ";

cout<<"\n\nPARK AVENUE PERFUME\t\t\t\t\t\t110 ";

cout<<"\n\nCOCONUT HAIR OIL\t\t\t\t\t\t90 ";

cout<<"\n\nTITAN WATCH\t\t\t\t\t\t\t1199 ";

cout<<"\n\nLUX SOAP\t\t\t\t\t\t\t17 ";

cout<<"\n\nTIDE\t\t\t\t\t\t\t\t107 ";

cout<<"\n\nREEBOK SHOES\t\t\t\t\t\t\t1499 ";

cout<<"\n\n\n\t\t\tEnter your choice\t";

Page 21: 12th CBSE Computer Science Project

cin>>choice;

if(choice==1)

{

bis:

clrscr();

cout<<"\n\nPEPSODENT\t\t\t\t\t\t\t36";

pend=36;

cout<<"\n\tPEPSODENT(MAX 5): \t";

cin>>m;

if(m>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5"; getch();

goto items;

}

else

abis=1000-m;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

clrscr();

goto items;

}

else

{

Page 22: 12th CBSE Computer Science Project

clrscr();

goto cash;

}

}

if(choice==2)

{

pep:

clrscr();

cout<<"\n\nDENIM POWDER\t\t\t\t\t\t\t110 ";

asc=110;

cout<<"\n\n\tDENIM POWDER(MAX 5):\t ";

cin>>n;

if(n>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5";

getch();

goto items;

}

else

apep=1000-n;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

Page 23: 12th CBSE Computer Science Project

clrscr();

goto items;

}

else

{

clrscr();

goto cash;

}

}

if(choice==3)

{

den:

clrscr();

cout<<"\n\nMUNCH\t\t\t\t\t\t\t\t8 ";

print=8;

cout<<"\n\tMUNCH(MAX 5):\t ";

cin>>o; if(o>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5";

goto items;

}

else

aden=110-o;

Page 24: 12th CBSE Computer Science Project

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

clrscr();

goto items;

}

else

{

clrscr();

goto cash;

}

}

if(choice==4)

{

mun:

clrscr();

cout<<"\n\nPARK AVENUE PERFUME\t\t\t\t\t\t110 ";

aweb=110;

cout<<"\n\n\tPARK AVENUE PERFUME(MAX 5):\t ";

cin>>p;

if(p>5)

{

Page 25: 12th CBSE Computer Science Project

cout<<"\n\n\tEnter Quantity Smaller than 5";

getch();

goto items;

}

else

amun=1000-p;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

clrscr();

goto items;

}

else

{

clrscr();

goto cash;

}

}

if(choice==5)

{

park:

clrscr();

cout<<"\n\nCOCONUT HAIR OIL\t\t\t\t\t\t90 ";

Page 26: 12th CBSE Computer Science Project

graph=90;

cout<<"\n\tCOCONUT HAIR OIL(MAX 5):\t ";

cin>>q;

if(q>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5";

getch();

goto items;

}

else

aperk=500-q;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes; if(yes=='y')

{

clrscr();

goto

items;

}

else

{

clrscr();

goto cash;

}

}

Page 27: 12th CBSE Computer Science Project

if(choice==6)

{

coco:

clrscr();

cout<<"\n\nTITAN WATCH\t\t\t\t\t\t\t1199 ";

ram=1199;

cout<<"\n\tTITAN WATCH(MAX 2): ";

cin>>r;

if(r>2)

{

cout<<"\n\n\tEnter Quantity Smaller than 2";

getch();

goto items;

}

else

acoc=400-r;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

clrscr();

goto items;

}

else

Page 28: 12th CBSE Computer Science Project

{

clrscr();

goto cash;

}

}

if(choice==7)

{

titan:

clrscr();

cout<<"\n\nLUX SOAP\t\t\t\t\t\t\t17 ";

hard=17;

cout<<"\n\tLUX SOAP(MAX 5):\t ";

cin>>s;

if(s>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5";

getch();

goto items;

}

else

atit=100-s;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

Page 29: 12th CBSE Computer Science Project

if(yes=='y')

{

clrscr();

goto items;

}

else

{

clrscr();

goto cash;

}

}

if(choice==8)

{

lux:

clrscr();

cout<<"\n\nTIDE\t\t\t\t\t\t\t\t107 ";

win=107;

cout<<"\n\tTIDE(MAX 5):\t ";

cin>>t;

if(t>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5";

getch();

goto items;

Page 30: 12th CBSE Computer Science Project

}

else

alux=1000-t;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

clrscr();

goto items;

}

else

{

clrscr();

goto cash;

}

}

if(choice==9)

{

tid:

clrscr();

cout<<"\n\nREEBOK SHOES\t\t\t\t\t\t\t1499 ";

ant=1499;

Page 31: 12th CBSE Computer Science Project

cout<<"\n\tREEBOK SHOES(MAX 5): ";

cin>>u;

if(u>5)

{

cout<<"\n\n\tEnter Quantity Smaller than 5";

getch();

goto items;

}

else

atid=1000-u;

cout<<"\n\tDO you want to purchase more(y/n)";

cin>>yes;

if(yes=='y')

{

clrscr();

goto items;

}

else

{

clrscr();

goto cash;

}

}

Page 32: 12th CBSE Computer Science Project

cout<<"\n\n\n";

clrscr();

consumer c;

cash:

cout<<"\n\n\n\n\n\n\t\t\t\t ARMY CANTEEN\n";

cout<<"\n\n\t\t\t\t CASH MEMO\n";

cout<<"\n\n\n\n\n\n\n\n";

//TO DISPLAY THE INFORMATION OF THE CUSTOMER

c.display();

//TO DISPLAY THE CASH MEMO

cout<<"\n\n\n\n"; cout<<"=============================================================================";

cout<<"\nITEMS" <<setw(40)<<"quantity"<<setw(35)<<"price(rs.)";

cout<<"============================================================================";

if(m>0)

cout<<"\n\nPEPSODENT" <<setw(35)<<m<<setw(28)<<"rs."<<m*pend;

if(n>0)

cout<<"\n\nDENIM POWDER" <<setw(36)<<n<<setw(28)<<"rs."<<n*asc;

if(o>0)

cout<<"\n\nMUNCH" <<setw(36)<<o<<setw(28)<<"rs."<<o*print;

if(p>0)

cout<<"\n\nPARK AVENUE PERFUME" <<setw(37)<<p<<setw(28)<<"rs."<<p*aweb;

Page 33: 12th CBSE Computer Science Project

if(q>0)

cout<<"\n\nCOCONUT HAIR OIL" <<setw(31)<<q<<setw(28)<<"rs."<<q*graph;

if(r>0)

cout<<"\n\nTITAN WATCH" <<setw(40)<<r<<setw(28)<<"rs."<<r*ram;

if(s>0)

cout<<"\n\nLUX SOAP" <<setw(34)<<s<<setw(28)<<"rs."<<s*hard;

if(t>0)

cout<<"\n\nTIDE" <<setw(24)<<t<<setw(28)<<"rs."<<t*win;

if(u>0)

cout<<"\n\nREEBOK SHOES" <<setw(34)<<u<<setw(28)<<"rs."<<u*ant;

e=m*pend;

f=n*asc;

g=o*print;

h=p*aweb;

k=q*graph;

l=r*ram;

w=s*hard;

x=t*win;

y=u*ant;

Page 34: 12th CBSE Computer Science Project

sum=e+f+g+h+k+l+w+x+y; //TOTAL BILL

add=m+n+o+p+q+r+s+t+u; //QUANTITY OF ITEMS

cout<<"\n===========================================================================";

cout<<"\nTOTAL:"<<setw(38)<<add<<setw(27)<<"rs."<<sum;

money:

cout<<"\n\n\n\n\t\t\tEnter the cash paid\t";

cin>>total;

cout<<"\n\n\n\t\t\tCASH RECIEVED :"<<total;

if(total<sum)

{

cout<<"\n\n\tThe money you paid is less !!!! Please pay more money";

getch();

goto money;

}

getch();

goto again;

}

else

{

clrscr();

Page 35: 12th CBSE Computer Science Project

getch();

goto again;

}

case 2:

//TO DISPLAY THE CANTEEN DETAILS

clrscr();

cout<<"\n\n\n\n\n\t\t\t\tSHOP DETAILS\n\n\n"; cout<<"\n\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n";

cout<<"\t\t # TIMING: 11 AM TO 02 PM & 03 PM TO 05 PM \n";

cout<<"\t\t # SHOP WILL CLOSED ON TUESDAY. \n";

cout<<"\t\t # GOODS ONCE SOLD WILL NOT BE EXCHANGED/REPLACED. \n";

cout<<"\t\t # TAKE YOUR SMART CARD WITH YOU. \n";

cout<<"\t\t # COLLECT YOUR SMART CARD & BILL AFTER PAYMENT. \n";

cout<<"\t\t # DO NOT BREAK ANY SHOP ITEMS. \n";

cout<<"\t\t # FOR ANY COMPLAINT CONTACT THE CHAIR PERSON. \n";

cout<<"\t\t # WELL QUALIFIED STAFF MEMBERS. \n";

cout<<"\t\t # Email :- www.army_canteen.com \n"; cout<<"\n\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n";

getch();

clrscr();

goto again;

case 3: //TO SEARCH THE RECORDS

clrscr();

c1.search();

getch();

Page 36: 12th CBSE Computer Science Project

goto again;

case 4: //TO DELETE THE RECORDS

clrscr();

c1.del();

getch();

goto again;

case 5: //TO MODIFY THE RECORDS

clrscr();

c1.update();

getch();

goto again;

case 6: //TO DISPLAY ALL SAVED RECORDS

{

clrscr();

c1.read();

getch();

goto again;

}

case 7: //TO DISPLAY THE QUANTITY AVAILABLE IN THE SHOP

clrscr();

if(m>0||n>0||o>0||p>0||q>0||r>0||s>0||t>0||u>0||v>0)

{

Page 37: 12th CBSE Computer Science Project

cout<<"\n\t\t\tItems Avaliable in shop.\n\n\n";

cout<<"=============================================================================";

cout<<"\nITEMS" <<setw(40)<<"quantity";

cout<<"\n===========================================================================";

cout<<"\n\n\nPEPSODENT" <<setw(37)<<abis;

cout<<"\n\n\nDENIM POWDER" <<setw(38)<<apep;

cout<<"\n\n\nMUNCH" <<setw(38)<<aden;

cout<<"\n\n\nPARK AVENUE PERFUME" <<setw(39)<<amun;

cout<<"\n\n\nCOCONUT HAIR OIL" <<setw(33)<<aperk;

cout<<"\n\n\nTITAN WATCH" <<setw(42)<<acoc;

cout<<"\n\n\nLUX SOAP" <<setw(35)<<atit;

cout<<"\n\n\nTIDE" <<setw(26)<<alux;

cout<<"\n\n\nREEBOK SHOES" <<setw(36)<<atid;

cout<<"\n***************************************************************************"; getch();

Page 38: 12th CBSE Computer Science Project

goto again;

}

else

{

{

cout<<"\n\t\t\tItems Avaliable in shop.\n\n\n";

cout<<"=============================================================================";

cout<<"\nITEMS" <<setw(40)<<"quantity";

cout<<"\n===========================================================================";

cout<<"\n\n\nPEPSODENT" <<setw(37)<<1000;

cout<<"\n\n\nDENIM POWDER" <<setw(38)<<1000;

cout<<"\n\n\nMUNCH" <<setw(37)<<110;

cout<<"\n\n\nPARK AVENUE PERFUME" <<setw(39)<<1000;

cout<<"\n\n\nCOCONUT HAIR OIL" <<setw(32)<<500;

cout<<"\n\n\nTITAN WATCH" <<setw(41)<<400;

cout<<"\n\n\nLUX SOAP" <<setw(35)<<100;

Page 39: 12th CBSE Computer Science Project

cout<<"\n\n\nTIDE" <<setw(26)<<1000;

cout<<"\n\n\nREEBOK SHOES" <<setw(36)<<1000;

cout<<"\n\n*************************************************************************";

getch();

goto again;

}

case 0: //TO EXIT FROM THE PROGRAM

clrscr();

cout<<"\n\n\n\t\tARE YOU SURE TO EXIT FROM THE PROGRAM\t";

cin>>et;

if(et=='y')

{

cout<<"YOU HAVE SELECTED TO TERMINATE THE PROGRAM\nPROGRAM TERMAINATING............";

getch();

clrscr();

cout<<"\n\n\t\t\tTHANK YOU FOR USING THIS SOFTWARE\n\t THIS SOFTWARE IS CREATED BY THE STUDENTS OF K. V. GOLE MARKET.\n\t\t\t\tPLEASE DONT COPY ";

getch();

return 1;

}

Page 40: 12th CBSE Computer Science Project

else

{

goto again;

}

default: cout<<"OOPS!!!!!!!! Your choice is WRONG";

getch();

goto again;

}

}

}

}

1. Certificate

2. Declaration

CONTENTS

Page 41: 12th CBSE Computer Science Project

3. Acknowledgement

4. Introduction to c++

5. Introduction to Project

6. Codings

7. Outputs

8. Bibliography

Page 42: 12th CBSE Computer Science Project

This is to certify that the project entitled “CANTEEN MANAGEMENT” is a record of bonafide work carried out by “Ashwin Francis 12th A”.In partial fulfilment of the requirements in COMPUTER SCIENCE prescribed by CBSE for CBSE BOARD 2014-2015 in the school Kendriya Vidyalaya Gole Market,New Delhi 110001.

DATE PRINCIPAL

INTERNAL EXTERNAL

EXAMINER EXAMINER

DECLARATION

CERTIFICAT

E

Page 43: 12th CBSE Computer Science Project

We hereby declare that the project work entitled “CANTEEN MANAGEMENT“. Submitted to KENDRIYA VIDYALAYA GOLE MARKET, NEW DELHI for theSubject of “COMPUTER SCIENCE“. Under the guidance of Mrs.Neera Singhal, PGT(COMP), Is a record of original work done by us.We further Declare that this project record or any part of this has not been Submitted elsewhere for any other class.

DATE MEMBERS

PLACE

ACKNOWLEDGE

MENT

Page 44: 12th CBSE Computer Science Project

We wish to express our sincere thanks to Mr. DHIR SINGH Principal,Kendriya Vidyalaya Gole Market, New Delhi for guiding us to cause the successful

outcome of this project work.

We wish to express our deep & profound sense of gratitude to our guide/teacher Mrs.Neera Singhal,

PGT(COMP), For her expert help &valuable guidance, comments and suggestions.

We also place on record, our sincere Gratitude to one and all who ,Directly or Indirectly ,Have Lent

their helping hand in this venture.

INTRODUCTION TO C++

Page 45: 12th CBSE Computer Science Project

:- It is designed with a bias toward system programming (e.g., for use in embedded systems or operating system kernels), with performance, efficiency and flexibility of use as its design requirements. C++ has also been found useful in many other contexts, including desktop applications, servers (e.g. e-commerce, web search or SQL servers), performance-critical applications (e.g. telephone switches or space probes), and entertainment software.[3]C++ is a compiled language, with implementations of it available on many platforms and provided by various organizations, including the FSF, LLVM, Microsoft and Intel.

:- C++ is standardized by the International Organization for Standardization (ISO), with the latest (and current) standard version ratified and published by ISO in September 2011 as ISO/IEC 14882:2011 (informally known as C++11).[4] The C++ programming language was initially standardised in 1998 as ISO/IEC 14882:1998, which was then amended by the C++03, ISO/IEC 14882:2003, standard. The current C++11 standard supersedes these, with new features and an enlarged standard library. Before the initial standardization in 1998, C++ was developed by Bjarne Stroustrup at Bell Labs, starting in 1979, who wanted an efficient flexible language (like the C language), which also provided high-level features for program organization.

Function:- A function is a group of statements that together perform a task. Every C++ program has at least one function, which is main(), and all the most trivial programs can define additional functions.A function declaration tells the compiler about a function's name, return type, and parameters. A functiondefinition provides the actual body of the function.The C++ standard library provides numerous built-in functions that your program can call. For example, function strcat() to concatenate two strings, function memcpy() to copy one memory location to another location and many more functions.

Page 46: 12th CBSE Computer Science Project

Class:- A class is a user defined type or data structure declared with keyword class that has data and functions (also called methods) as its members whose access is governed by the three access specifiers private, protected or public (by default access to members of a class is private). A class (declared with keyword class) in C++ differs from a structure (declared with keyword struct) as by default, members are private in a class while they are public in a structure. The private members are not accessible outside the class; they can be accessed only through methods of the class.

Data FILE HANDLING:- The fstream library predefines a set of operations for handling file related input and output. It defines certain classes that help one perform file input and output. For ex, ifstream class ties a file to the program for input ; ofstream class ties a file to the program for output ; and fstream class ties a file to the program for both input and output.

Page 47: 12th CBSE Computer Science Project

HELP FROM INTERNET

INFORMATION FROM BOOKS

HELP FROM TEACHERS

BIBLIOGRAPHY

OUTPUT

Page 48: 12th CBSE Computer Science Project
Page 49: 12th CBSE Computer Science Project
Page 50: 12th CBSE Computer Science Project
Page 51: 12th CBSE Computer Science Project
Page 52: 12th CBSE Computer Science Project
Page 53: 12th CBSE Computer Science Project
Page 54: 12th CBSE Computer Science Project
Page 55: 12th CBSE Computer Science Project
Page 56: 12th CBSE Computer Science Project
Page 57: 12th CBSE Computer Science Project
Page 58: 12th CBSE Computer Science Project
Page 59: 12th CBSE Computer Science Project
Page 60: 12th CBSE Computer Science Project
Page 61: 12th CBSE Computer Science Project