Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SIGNATURE OF EXAMINER
I hereby declare that the project work
entitled “Super Market Billing”, submitted to
department of computer science, Kendriya
Vidyalaya, Khagaria is prepared by me. All the
coding is result of my personal efforts.
HARSH KUMAR
Class- XII Sci.
I would like to express a deep sense of thanks to
my project guide Mr. Manoj Kumar Singh Sir for
guiding me immensely though the course of the
project. He always evinced keen interest in my
work. His constructive advice and constant
motivation have been responsible for the
successful completion of this project.
My sincere thanks go to Mr. Yashdeep Rohilla, our
principal sir, for His coordination in extending
every possible support for the completion of this
project.
I also thanks to my parents for their motivation
and support. I must thanks to my classmates for
their timely help and support for compilation of
this project.
Last but not the least; I would like to thank all
those who had helped directly or indirectly
toward the completion of this project.
--Certificate
--Declaration
--Acknowledgement
--Files generated
--Working description
--Coding
--Output screen
--Bibliography
The platform used is C++. Hence we
decided to use Microsoft Visual Studio
2010/2008 edition (Professional Edition).
For optional coding and easy debugging we
used Microsoft Visual Studio 2008 edition
and made explicit .cpp files.
Henceforth for optimal usage of such
software a windows based operating system
preferably Windows vista/7/XP must be
there. Also on the hardware part any system
having Windows Vista/7/XP installed will
suffice.
Class:
Product
Functions
create_product():
This function is to be used by
theadministrator to add new products to
their list.
• show_product():
This function is used bytheadministrator
to display the details of all the products.
• retprice():
It returns the price of theproduct.
• retpno():
It returns the product number.
• retname():
It returns the name of the product.
• retdis():
It returns the discount available on the
product
• fstream:
The object declared for this class isfp. It
isthe predefined class used for both File-
to-Memory/Memory-to-File linking.
• write_product():
This function writes the informationabout
the product in the file
• display_all():
This function displays all records.
• display_sp():
This function displays some
specificrecordsbased on the product
number entered by the user.
• modify_product():
This function modifies the product details
by entering the product number.
• delete_product():
This function deletes the product by
entering the product number
• menu():
This function the product number, its
name and its price.
• place_order():
This function places order and generates
bill for the products bought.
• box():
This function is used to create outlines
around the outputs.
• intro():
This function displays the project name.
• admin_menu():
This function displays a list of functionto
be operated by administrator to
modify/updateproducts details .The
function uses above user-
definedfunctions.
• main():
This is the main function which just
theMAINMENUfrom where the control is
transferred to otherfunctions
fstream.h- for file handling, cin, cout,
open(),close(),seekp()
gotoxy(X,Y) functions
PROGRAM FILE
super-market-billing.CPP
OBJECT FILE
SUPER-~1.OBJ
EXECUTION FILE
SUPER-~1.EXE
Work in the Supermarket will be done in the
following way the product will come in the store.
The Administrator will enter the information of
theproduct in database and price and
discountavailable for each product.
The customer will come and take the basket with
him/her and choose the product and take it to the
counter.
The bill calculating operator will enter the
productnumber then it will show its information and
price and the bill will be calculated and total payment
will be shown.
Customer will pay for the products.
/*----------Super Market Billing-------------*/
/*Header File*/
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
/*Class*/
class product
{
int pno;
char name[50];
float price,qty,tax,dis;
public:
product()
{
pno=000;
strcpy(name,"...");
price=000;
qty=000;
tax=000;
dis=000;
}
void create_product()
{
cout<<"Please Enter The Product No.
of The Product: ";
cin>>pno;
cout<<"\n\nPlease Enter The Name of
The Product: ";
gets(name);
cout<<"\nPlease Enter The Price of
The Product: ";
cin>>price;
cout<<"\nPlease Enter The Discount
(%): ";
cin>>dis;
}
void show_product()
{
cout<<"\nThe Product No. of The
Product: "<<pno;
cout<<"\nThe Name of The Product: ";
puts(name);
cout<<"\nThe Price of The Product:
"<<price;
cout<<"\nDiscount: "<<dis;
}
int retpno()
{
return pno;
}
float retprice()
{
return price;
}
char* retname()
{
return name;
}
int retdis()
{
return dis;
}
fp2.write((char*)&pr,sizeof(product));
}
}
fp2.close();
fp.close();
remove("Shop.dat");
rename("Temp.dat","Shop.dat");
cout<<"\n\n\tRecord Deleted ..";
getch();
}
cout<<pr.retpno()<<"\t"<<pr.retname()<<"\t\t
"<<pr.retprice()<<\n;
}
fp.close();
}
cout<<"\n"<<order_arr[x]<<"\t"<<pr.retname()
<<"\t\t"<<quan[x]<<"\t\t"<<pr.retprice()<<"\t"<<
amt<<"\t\t"<<damt;
total+=damt;
}
fp.read((char*)&pr,sizeof(product));
}
fp.close();
}
gotoxy(36,10);
cout<<"TOTAL = "<<total;
getch();
}
/*Box*/
void box(void)
{
int i;
for(i=18;i<60;i++)
{
gotoxy(i,1);
cout<<"*";
}
for(i=18;i<60;i++)
{
gotoxy(i,3);
cout<<"*";
}
for(i=1;i<22;i++)
{
gotoxy(16,i);
cout<<"*";
}
for(i=18;i<60;i++)
{
gotoxy(i,21);
cout<<"*";
}
for(i=1;i<22;i++)
{
gotoxy(61,i);
cout<<"*";
}
}
/*INTRODUCTION FUNCTION*/
void intro()
{
clrscr();
box();
gotoxy(25,2);
cout<<"|----------WELCOME----------|";
gotoxy(32,5);
cout<<"|SUPER MARKET|";
gotoxy(34,6);
cout<<"|BILLING|";
gotoxy(34,10);
cout<<"-PROJECT-";
gotoxy(20,18);
cout<<"MADE BY : HARSH KUMAR";
gotoxy(20,19);
cout<<"SCHOOL : Kendriya Vidyalaya,
Khagaria";
getch();
}
/*-------------END OF PROJECT----------------*/
/*Designed By: Harsh Kumar*/
Welcome Screen:
Main Menu:
Admin Menu:
Create Product:
Costumer :
Receipt:
http://www.google.com/
http://en.wikipedia.org
http://www.slideshare.net/