Professional Documents
Culture Documents
.programmingenhance
HOME ABOUT PROGRAMMING ENHANCE COURSES PLACEMENTS DOWNLOADS PROJECT EVENT PROGRAMMING WITH FUN CONTACT US
Search
Description: This C++ menu driven programs on SUPERMARKET
BILLING SYSTEM has product class with data members like product Popular Tags Blog Archives
no, product name, price, qty, tax, discount. Product details is stored in a
binary file. A customer can purchase product and his invoice generated.
Administrator can create, modify, view and delete product record.
POST
//*************************************************************** C++ Project ( 37 )
// HEADER FILE USED IN PROJECT
//**************************************************************** C Plus Plus Programs ( 36 )
#include<conio.h>
#include<stdio.h> C Language ( 27 )
#include<process.h>
#include<fstream.h> C# ( 25 )
//***************************************************************
// CLASS USED IN PROJECT Servlet ( 17 )
//****************************************************************
class product Netbeans ( 15 )
{
java ( 13 )
int pno;
char name[50];
JSP ( 10 )
float price,qty,tax,dis;
public: INTERVIEW Question ( 6 )
void create_product()
{ VB.NET ( 6 )
cout<<"\nPlease Enter The Product No. of The Product ";
cin>>pno; ASP.Net ( 4 )
cout<<"\n\nPlease Enter The Name of The Product ";
gets(name); Java 1.6 ( 4 )
cout<<"\nPlease Enter The Price of The Product ";
cin>>price; Swing ( 4 )
cout<<"\nPlease Enter The Discount (%) ";
cin>>dis; jdbc ( 4 )
}
void show_product() Ajax & Json ( 3 )
{
Applet ( 3 )
cout<<"\nThe Product No. of The Product : "<<pno;
cout<<"\nThe Name of The Product : ";
Blogger ( 3 )
puts(name);
cout<<"\nThe Price of The Product : "<<price; Caching ( 3 )
cout<<"\nDiscount : "<<dis;
} Android ( 2 )
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 1/8
9/11/2017 C++ Supermarket Billing Project
int retpno()
{return pno;} Download ( 2 )
float retprice()
{return price;} Java Script ( 2 )
char* retname()
{return name;} Layout Manager ( 2 )
int retdis()
{return dis;} Prepared Statement ( 2 )
}; //class ends here
Blogging ( 1 )
//***************************************************************
Callable Statement ( 1 )
// global declaration for stream object, object
//**************************************************************** CookieServlet ( 1 )
fstream fp;
product pr; Database Connectivity ( 1 )
//***************************************************************
// function to write in file Facebook ( 1 )
//****************************************************************
void write_product() Full Screen of turbo C++ in windows vista or
{ windows7 ( 1 )
fp.open("Shop.dat",ios::out|ios::app);
pr.create_product(); Google adsense ( 1 )
fp.write((char*)&pr,sizeof(product));
fp.close(); JNDI ( 1 )
cout<<"\n\nThe Product Has Been Created ";
Programming in C++ ( 1 )
getch();
}
Project report ( 1 )
//***************************************************************
// function to read all records from file Statement ( 1 )
//****************************************************************
void display_all() Struts Tutorial ( 1 )
{
clrscr(); Themes ( 1 )
cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n";
fp.open("Shop.dat",ios::in); VC#.NET ( 1 )
while(fp.read((char*)&pr,sizeof(product)))
{ Wordpress ( 1 )
pr.show_product();
cout<<"\n\n====================================\n"; c(1)
getch();
} oracle jdbc Connection ( 1 )
fp.close();
struts using net beans ( 1 )
getch();
}
struts with data base ( 1 )
//***************************************************************
// function to read specific record from file
//**************************************************************** Dilip Bari. Powered by Blogger.
void display_sp(int n)
{ ABOUT ME
int flag=0;
DI L I P BA RI
fp.open("Shop.dat",ios::in);
while(fp.read((char*)&pr,sizeof(product))) Follow 143
{
V I EW M Y CO M P LET E P R O FI LE
if(pr.retpno()==n)
{
clrscr();
pr.show_product();
TOTAL PAGEVIEWS
flag=1;
}
} 1 4 4 7 2 6
fp.close();
if(flag==0) BLOG ARCHIVE
cout<<"\n\nrecord not exist";
getch(); 2012 ( 148 )
} February ( 109 )
//***************************************************************
// function to modify record of file March ( 38 )
//**************************************************************** Mar 06 ( 4 )
void modify_product() Mar 07 ( 4 )
{
int no,found=0; Mar 08 ( 9 )
clrscr(); Pointer in c language.
cout<<"\n\n\tTo Modify ";
Difference Between C And C++.
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 2/8
9/11/2017 C++ Supermarket Billing Project
cout<<"\n\n\tPlease Enter The Product No. of The Product";
C++ BANK MANAGEMENT SYSTEM
cin>>no;
PROJECT
fp.open("Shop.dat",ios::in|ios::out);
while(fp.read((char*)&pr,sizeof(product)) && found==0) C++ LIBRARY MANAGEMENT SYSTEM
{ PROJECT
if(pr.retpno()==no)
C++ STUDENT REPORT CARD
{ SYSTEM
pr.show_product();
cout<<"\nPlease Enter The New Details of Product"<<endl; C++ Supermarket Billing Project
pr.create_product();
C++ HANGMAN GAME PROJECT
int pos=-1*sizeof(pr);
fp.seekp(pos,ios::cur); C++ TIC TAC TOE GAME PROJECT
fp.write((char*)&pr,sizeof(product));
C++ Casino Game Project
cout<<"\n\n\t Record Updated";
found=1;
} Mar 09 ( 2 )
}
Mar 14 ( 5 )
fp.close();
if(found==0) Mar 15 ( 11 )
cout<<"\n\n Record Not Found ";
Mar 18 ( 1 )
getch();
} Mar 20 ( 2 )
//***************************************************************
// function to delete record of file November ( 1 )
//****************************************************************
void delete_product()
{ 2013 ( 21 )
int no;
clrscr();
cout<<"\n\n\n\tDelete Record";
cout<<"\n\nPlease Enter The product no. of The Product You Want To Delete";
cin>>no;
fp.open("Shop.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("Shop.dat");
rename("Temp.dat","Shop.dat");
cout<<"\n\n\tRecord Deleted ..";
getch();
}
//***************************************************************
// function to display all products price list
//****************************************************************
void menu()
{
clrscr();
fp.open("Shop.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!! FILE COULD NOT BE OPEN\n\n\n Go To Admin Menu to create
File";
cout<<"\n\n\n Program is closing ....";
getch();
exit(0);
}
cout<<"\n\n\t\tProduct MENU\n\n";
cout<<"====================================================\n";
cout<<"P.NO.\t\tNAME\t\tPRICE\n";
cout<<"====================================================\n";
while(fp.read((char*)&pr,sizeof(product)))
{
cout<<pr.retpno()<<"\t\t"<<pr.retname()<<"\t\t"<<pr.retprice()<<endl;
}
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 3/8
9/11/2017 C++ Supermarket Billing Project
fp.close();
}
//***************************************************************
// function to place order and generating bill for Products
//****************************************************************
void place_order()
{
int order_arr[50],quan[50],c=0;
float amt,damt,total=0;
char ch='Y';
menu();
cout<<"\n============================";
cout<<"\n PLACE YOUR ORDER";
cout<<"\n============================\n";
do{
cout<<"\n\nEnter The Product No. Of The Product : ";
cin>>order_arr[c];
cout<<"\nQuantity in number : ";
cin>>quan[c];
c++;
cout<<"\nDo You Want To Order Another Product ? (y/n)";
cin>>ch;
}while(ch=='y' ||ch=='Y');
cout<<"\n\nThank You For Placing The Order";getch();clrscr();
cout<<"\n
\n********************************INVOICE************************\n";
cout<<"\nPr No.\tPr Name\tQuantity \tPrice \tAmount \tAmount after
discount\n";
for(int x=0;x<=c;x++)
{
fp.open("Shop.dat",ios::in);
fp.read((char*)&pr,sizeof(product));
while(!fp.eof())
{
if(pr.retpno()==order_arr[x])
{
amt=pr.retprice()*quan[x];
damt=amt-(amt*pr.retdis()/100);
cout<<"\n"<<order_arr[x]<<"\t"<<pr.retname()
<<"\t"<<quan[x]<<"\t\t"<<pr.retprice()<<"\t"<<amt<<"\t\t"<<damt;
total+=damt;
}
fp.read((char*)&pr,sizeof(product));
}
fp.close();
}
cout<<"\n\n\t\t\t\t\tTOTAL = "<<total;
getch();
}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
{
clrscr();
gotoxy(31,11);
cout<<"SUPER MARKET";
gotoxy(35,14);
cout<<"BILLING";
gotoxy(35,17);
cout<<"PROJECT";
cout<<"\n\nMADE BY : ANUJ KUMAR";
cout<<"\n\nSCHOOL : RYAN INTERNATIONAL SCHOOL";
getch();
}
//***************************************************************
// ADMINSTRATOR MENU FUNCTION
//****************************************************************
void admin_menu()
{
clrscr();
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 4/8
9/11/2017 C++ Supermarket Billing Project
char ch2;
cout<<"\n\n\n\tADMIN MENU";
cout<<"\n\n\t1.CREATE PRODUCT";
cout<<"\n\n\t2.DISPLAY ALL PRODUCTS";
cout<<"\n\n\t3.QUERY ";
cout<<"\n\n\t4.MODIFY PRODUCT";
cout<<"\n\n\t5.DELETE PRODUCT";
cout<<"\n\n\t6.VIEW PRODUCT MENU";
cout<<"\n\n\t7.BACK TO MAIN MENU";
cout<<"\n\n\tPlease 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<<"\n\n\tPlease Enter 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 OF PROGRAM
//****************************************************************
void main()
{
char ch;
intro();
do
{
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t01. CUSTOMER";
cout<<"\n\n\t02. ADMINISTRATOR";
cout<<"\n\n\t03. EXIT";
cout<<"\n\n\tPlease Select Your Option (1-3) ";
ch=getche();
switch(ch)
{
case '1': clrscr();
place_order();
getch();
break;
case '2': admin_menu();
break;
case '3':exit(0);
default :cout<<"\a";
}
}while(ch!='3');
}
//***************************************************************
// END OF PROJECT
//***************************************************************
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 5/8
9/11/2017 C++ Supermarket Billing Project
2 comments :
Create a Link
Popular Posts
How to Create Project report(Vehicle Management System)
INTRODUCTION Vehicle Management System is software which is helpful for bus
operators, who wants to operate many bus trips in a day. Ve...
Write a program to calculate the total expenses. Quantity and price per item are input
by the user and discount of 10% is offered if the expense is more than 7000.
#include<iostream.h> #include<conio.h> void main() { int totalexp, qty, price, discount;
cout<<" Enter quantit...
JDBC Demo Login using Netbeans and SQL Server step by step
1.First Create Database and Table in SQL Server create database JavaTest
create table Login ( username varchar(20), user...
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 6/8
9/11/2017 C++ Supermarket Billing Project
Description: This C++ mini project on STUDENT REPORT CARD has student class with data
members like roll no, name, marks and grade. Memb...
WAP to calculate the monthly telephone bills as per the following rule: Minimum Rs.
200 for upto 100 calls. Plus Rs. 0.60 per call for next 50 calls. Plus Rs. 0.50 per call for
next 50 calls. Plus Rs. 0.40 per call for any call beyond 200 calls.
#include<iostream.h> #include<conio.h> void main() { int calls; float bill; cout<<" Enter number
of calls :...
Write a program to calculate the total expenses. Quantity and price per item are input by the
user and discount of 10% is offered if the expense is more than 7000.
C++ Program to define a Class BOOK and accessing member function using its object.
WAP to calculate the monthly telephone bills as per the following rule: Minimum Rs. 200 for
upto 100 calls. Plus Rs. 0.60 per call for next 50 calls. Plus Rs. 0.50 per call for next 50 calls.
Plus Rs. 0.40 per call for any call beyond 200 calls.
C++ Program to define a class Batsman and accessing member function using its object.
Google+ Followers
Dilip Bari
Add to circles
SUBSCRIBE TO C,C++,JAVA,.NET,STRUTS,HIBERNATE
Posts C Language
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 7/8
9/11/2017 C++ Supermarket Billing Project
Comments C# Programs
C++ Programs
Java Programs
Design by New WpThemes | Blogger Theme by Lasantha - Premium Blogger Themes | sharepoint document management
http://programmingenhance.blogspot.com.co/2012/03/c-supermarket-billing-project.html 8/8