Sie sind auf Seite 1von 24

CHANDRAKANTHI PUBLIC SCHOOL

PROJECT REPORT
IN
COMPUTER SCIENCE FOR GRADE – XI
(2018 - 2019)

Submitted in partial fulfillment of the requirement of CBSE, Delhi


for the award of ‘Senior Secondary Certificate’ in computer science

SUBMITTED BY UNDER THE GUIDANCE OF

NAME : ATHISH.M MRS. SAKTHI PRIYA .N

ROLL NO. : 1

1
CHANDRAKANTHI PUBLIC SCHOOL

CERTIFICATE

This is to certify that ATHISH.M has completed his project work,


as a part of the paper Computer science, under my supervision
and guidance.
To the best of my knowledge, it is an original piece of work and is
worthy of consideration in partial fulfillment of the requirement
of CBSE, Delhi for the award of Senior School Certificate in
Computer science.

TEACHER INCHARGE PRINCIPAL

PLACE: COIMBATORE
DATE :

2
ACKNOWLEDGEMENT
At the outset, I would like to take this opportunity to express my
gratitude to the almighty God, for keeping me in good health all
through this grueling project work.

I, with great pleasure and sincerity would like to record my thanks,


gratitude and honor to our beloved Principal, Mrs. Karunambikeswari
who provided me, not only motivation, but also valuable guidance to
complete this project.

I place on record my sincere gratitude and appreciation to my project


guide Mrs.SakthiPriya .N, my Computer Science teacher for her kind
cooperation and guidance which enabled me to complete this project in
time.

I take this opportunity to dedicate my project to all the faculty members


who were a constant source of motivation and I express my deep
gratitude to their never ending support and encouragement during this
project.

Finally, I thank each and every one who helped me to complete


the task.

Place : (ATHISH.M)
Date : GRADE XI B
3
PROJECT TITLE:
TOTAL INCOME GENERATOR

4
INDEX

S.No Content Page. No


1 Abstract 6
2 Hardware Specifications 7
3 Software specifications 7
4 Modules 8
5 Data Flow Diagrams 9
6 Source Code 12
7 Screenshots 22
8 Conclusion 24
9 References 24

5
ABSTRACT

◘ This is a program created using C++, to calculate the total income


generated by the hotel operator on a day.
◘ This program is constructed using structures concept in C++.
◘ It initially display’s the name of the hotel followed by the menu
card of the hotel displaying its products along with its price.
◘ Then the program gets the input from the user to calculate the bill,
to calculate the program asks the user to enter the number of
products from each category in the menu card.
◘ The program then displays the bill by calculating the total amount
using the input entered by the user.
◘ At the end it gives the user three options: first one stating to refresh
today’s calculated income, second stating to display today’s
calculated income, and the last one to continue without displaying
the total income earned today.
◘ It uses various header files that include, iostream.h, stdio.h,
iomanip.h ,conio.h.

6
HARDWARE SPECIFICATION

The hardware requirements of this C++ program are:


1. Central Processing Unit [CPU].
2. Monitor.
3. Hard Disk.
4. Mouse.
5. Keyboard.

SOFTWARE SPECIFICATION

The software requirements of this C++ program are:


1. Turbo C++.
2. Operating System.
3. Language Processor.

7
MODULES

There are 4 modules in this C++ program:

 Module 1: This module displays the menu card of the shop in


which the names of the product and its prices are mentioned.

 Module 2: This module allows the operator or user to input the


number of products and its requirement.This helps the program to
calculate the total bill.

 Module 3:This module displays the bill listed with the products
chosen and its requirement along with the calculation of the gst.

 Module 4:This the last module that enables the user to view the
total income of the shop.

8
DATA FLOW DIAGRAMS

Start

Declaration of products and


its price using structures.

Initializing the variables to


the price of products and the
requirements of products.

Displaying menu card with its


products along with its price.

9
A

Receiving input from the user


and storing it in the declared
variables.

Calculation of the total amount and displaying the


bill .

Displaying the bill.

10
B

1.Display today’s total


earnings

2.Refresh today’s earnings

3.Continue

Display total earning by Display the total income


adding the total cost of as the cost of the bill.
the previous bills.

STOP

11
SOURCE CODE
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
#include<stdio.h>
#include<stdlib.h>
struct pizza
{
unsigned int a,b;
}p1,p2,p3,p4,p5,p6,p7;
void main()
{int ab;
cout<<setw(47)<<"MACAW'S PIZZA WORLD\n";
cout<<" Menu Card\n";
Item"<<setw(22)<<"Price"<<setw(9)<<"|"<<setw(11)<<"
Item"<<setw(22)<<"Price\n";

12
cout<<"Margherita"<<setw(6)<<"-"<<setw(9)<<"75"
<<setw(11)<<"|"<<setw(13)<<"Pepper"<<setw(7)<<"-
"<<setw(11)<<"175"<<"\n";
cout<<" Meatza"<<setw(9)<<"-
"<<setw(10)<<"245"<<setw(10)<<"|"<<setw(13)<<"
Cheese Margherita"<<setw(2)<<"-
"<<setw(12)<<"130\n";
cout<<"Barbeque Chicken"<<setw(1)<<"-
"<<setw(10)<<"175"<<setw(10)<<"|"<<setw(17)<<"Zest
y Chicken"<<setw(3)<<"-"<<setw(12)<<"210\n";
p1.a=75;
p2.a=175;
p3.a=245;
p4.a=130;
p5.a=175;
p6.a=210;
p7.a=20;
cout<<setw(40)<<"BILLING\n";
cout<<"\nEnter the no of products under each
category:\n"<<"\n";
13
cout<<" Margherita:";
cin>>p1.b;
cout<<"\n Pepper:";
cin>>p2.b;
cout<<"\n Meatza:";
cin>>p3.b;
cout<<"\n Cheese Margherita:";
cin>>p4.b;
cout<<"\n Barbeque Chicken:";
cin>>p5.b;
cout<<"\n Zesty Chicken:";
cin>>p6.b;
cout<<"\n Basil/Tatar Dip:";
cin>>p7.b;
cout<<setw(40)<<" BILL\n";
int k,l,m,n,o,p,q,r;
r=1;
if(p1.b==0)
14
{
k=0;
}
else if(p1.b>0)
{
k=r;
}
if(p2.b==0)
{l=k;
}
else if(p2.b>0)
{l=k+1;
}
if(p3.b==0)
{m=l;
}
else if(p3.b>0)
{m=l+1;
15
}
if(p4.b==0)
{n=m;
}
else if(p4.b>0)
{n=m+1;
}
if(p5.b==0)
{o=n;
}
else if(p5.b>0)
{o=n+1;
}
if(p6.b==0)
{p=o;
}
else if(p6.b>0)
{p=o+1;
16
}
if(p7.b==0)
{q=p;
}
else if(p7.b>0)
{q=p+1;
}
cout<<" \n \n";
cout<<"S.no"<<setw(22)<<"Pizza
Name"<<setw(19)<<"Price"<<setw(15)<<"Nos"<<setw(1
7)<<"Cost\n";
cout<<" \n";
if(p1.b>0)
{
cout<<k<<setw(25)<<"Margherita"<<setw(17)<<p1.a<<s
etw(17)<<p1.b<<setw(15)<<p1.a*p1.b<<"\n";
}
if(p2.b>0)

17
{
cout<<l<<setw(25)<<"Pepper"<<setw(17)<<p2.a<<setw(
17)<<p2.b<<setw(15)<<p2.a*p2.b<<"\n";
}
if(p3.b>0)
{cout<<m<<setw(25)<<"Meatza"<<setw(17)<<p3.a<<set
w(17)<<p3.b<<setw(15)<<p3.a*p3.b<<"\n";
}
if(p4.b>0)
{cout<<n<<setw(25)<<"Cheese
Margherita"<<setw(17)<<p4.a<<setw(17)<<p4.b<<setw(
15)<<p4.a*p4.b<<"\n";
}
if(p5.b>0)
{
cout<<o<<setw(25)<<"Barbeque
Chicken"<<setw(17)<<p5.a<<setw(17)<<p5.b<<setw(15)
<<p5.a*p5.b<<"\n";
}

18
if(p6.b>0)
{
cout<<p<<setw(25)<<"Zesty
Chicken"<<setw(17)<<p6.a<<setw(17)<<p6.b<<setw(15)
<<p6.a*p6.b<<"\n";
}
if(p7.b>0)
{
cout<<q<<setw(25)<<"Basil/Tatar
Dip"<<setw(17)<<p7.a<<setw(17)<<p7.b<<setw(15)<<p
7.a*p7.b<<"\n";
}
int d,e,f,g,h,i,j;
d=p1.a*p1.b;
e=p2.a*p2.b;
f=p3.a*p3.b;
g=p4.a*p4.b;
h=p5.a*p5.b;
i=p6.a*p6.b;
19
j=p7.a*p7.b;
int c;
float u;
u=(d+e+f+g+h+i+j)*(0.05);
c=(d+e+f+g+h+i+j)*(0.05);
cout<<" \n"<<" \n";
cout<<setw(25)<<"Gst tax: "<<setw(49)<<u;
cout<<setw(80)<<" (Gst rounded off)";
cout<<"\n"<<setw(75)<<"___________________";
cout<<"\nTotal"<<setw(70)<<d+e+f+g+h+i+j+c<<"\n";
cout<<setw(76)<<"___________________\n";
cout<<"------------------------------------------------------------
--------------------\n";
long unsigned int amt,ern;
amt=d+e+f+g+h+i+j;
ern+=amt;
int z;
cout<<"\nPress 0 to know today's earnings.";
20
cout<<"\nPress 1 to Skip.";
cout<<"\nPress 2 to refresh earnings.\n";
cin>>z;
switch(z)
{
case 0:cout<<"Today's Earning:"<<ern;
break;
case 1:cout<<" \n";
break;
case 2:ern=0;
cout<<"Earning Refreshed.";
break;
default:cout<<"Invalid Input!\n";
break;
}
getch();
}

21
SCREENSHOTS

22
23
CONCLUSION

Hence this simple C++ program helps the hotel operator to easily
calculate their daily incomes and also refresh the incomes on daily
basis.This program can be further developed by including the bill
number, time of billing ,name of the operator .

REFERENCES

Sumita Arora Textbook – Computer science with C++.

24

Das könnte Ihnen auch gefallen