Академический Документы
Профессиональный Документы
Культура Документы
ABSTRACT
The Project “supermarket billing system” deals with the automation of supermarket. This
software will help salespersons in managing the various types of Records pertaining to
his/her customer. The product will help the user to work in a highly effective and
efficient environment.
The salespersons have been recording the customer information in the past and
even in the present through their personal manual efforts. And indeed, it consumes their
considerable time and energy that could be utilized in the better productive activities.
Apart from that, with increasing customer Strength, the task of managing information
of each individual customer is indeed a cumbersome task.
There is a lot of reason for the introduction of this project. In the manual System,
there are number of inefficiencies that a salesperson faces. The information retrieval is
one of the foremost problems. It is very difficult to gather the overall performance reports
of the customer. Large records-books have to be maintained where relevant and irrelevant
information has to be stored which is very untidy and clumsy process. Usually, they lack
efficiency. Less efficiency has a great impact on the productivity of any human being
keeping the data up-to-date.
Supermarket is the place where customers come to purchase their daily using
products and pay for that. So there is need to calculate how many products are sold and to
generate the bill for the customer. First is the data entry operator who will enter the
products in file. Second one is the administrator who will decide the taxes and discounts
to the products and can see the report of any product.
CONTENTS
1) Introduction
1.1) Objectives
1.2) Scope
2) System analysis
2.3) Modules
3) Requirement Analysis
5) System Requirements
6) System Design
6.3) Coding
8) Snapshots
9) Future Enhancement
10) Conclusion
1) Introduction:
Supermarket billing system is a very simple mini project in C++, built as console
application without using graphics features. It’s just a demonstration of the use of file
handling and stream class in C++ language.
Supermarket is the place where customers come to purchase their daily using
products and pay for that. So there is a need to calculate how many products are sold and
to generate the bill for the customer. The software of billing system having information
about the product and make bill without any mistake. Add the new product and contains
information about remaining items.
Many Supermarket use this type of billing systems for a decade. It also improved
many times according to the requirements of customer and sellers. It does the same work
that is calculating the bill and give it to the customer and maintain proper database. They
are accurate in calculating and also generate records.
1.1) Objective:
The main objective of the project is to make software fast in processing and it
should be used for a long time without error and maintenance. Provides a convenient
solution of billing pattern and Make an easy to use environment for users and customers.
1.2) Scope:
Scope is more at certain area where billing is required and it also avoid the fake
dealers. Easy to maintain in future prospect. This project will help the store keeper in fast
billing.
2) System analysis:
System Analysis is the first and foremost phase in the methodology of system
development because the development of and success of all the phases ahead are entirely
dependent on the successful development of this phase hence, system analysis in this
organization is taken as most crucial and done very carefully.
Many Supermarkets use this type of billing system for a decade. It is also
improved many times according to requirements of sellers and customers. It does the
same work that is calculating the bill, gives it to the customer and maintain proper
database. They are accurate in calculation and printing, they also generate records. A new
concept is also added in the billing system is that they also maintain relationships with
the customers who purchase more products from the store regularly. System also
concerns their requirements and gives them more commission.
To reduce the bottlenecks of the existing system there is a need to develop a new
system. The new system should concern the requirements of the customer and the sellers.
It has the following qualities:
2. Error reduction.
5. Flexibility.
6. Reduced dependency.
Proposed system has these qualities including the qualities of the existing system.
2.3) Modules:
2.31) Administrator
2.32) Customer
2.31) Administrator:
Administrator Plays a major role in our project. They are responsible to create a product
and delete new product and they can modify the product and view and they can check the
product after modification or altering the product.
Initially the admin of the system will add the amount of the particular product
after entering the details of the product and he can also add the discount of a particular
product.
2.31) Customer:
Customer is another module in our project. They can purchase the available product. The
product number will be shown by the administrator. Using the product number they can
purchase and they can enter the amount of quantity they required after completion the
admin will generate the total price of the product with discount and he also generate the
bill of the particular product to the customer.
3) Requirement analysis
C++ is an object-oriented programming language and incorporates all the features offered
by C. C++ started its journey as C with classes. Gradually, it has evolved and despite the
popularity of other programming languages like C# and Java, C, C++ holds its own as
one of the most widely used languages for scripting.
C++ is a general purpose programming language and widely used now a days for
competitive programming. It has imperative, object-oriented and generic programming
features. C++ runs on lots of platform like Windows, Linux, Unix, Mac etc.
In C++, files are mainly dealt by using three classes fstream, ifstream, ofstream available
in fstream header file.
1 ios::app
Append mode. All output to that file to be
appended to the end.
2 ios::ate
Open a file for output and move the read/write
control to the end of the file.
3 ios::in
Open a file for reading.
4 ios::out
Open a file for writing.
5 ios::trunk
If the file already exists, its contents will be
truncated before opening the file.
6) System Design:
6.1) Data Flow Diagram:
A data flow diagram (DFD) maps out the flow of information for any process or system.
It uses defined symbols like rectangles, circles and arrows, plus short text labels, to show
data inputs, outputs, storage points and the routes between each destination. Data
flowcharts can range from simple, even hand-drawn process overviews, to in-depth,
multi-level DFDs that dig progressively deeper into how the data is handled. They can be
used to analyze an existing system or model a new one. Like all the best diagrams and
charts, a DFD can often visually “say” things that would be hard to explain in words, and
they work for both technical and nontechnical audiences, from developer to CEO. That’s
why DFDs remain so popular after all these years. While they work well for data flow
software and systems, they are less applicable nowadays to visualizing interactive, real-
time or database-oriented software or systems.
Input design:
The input design is the link between the information system and the user. It comprises the
developing specification and procedures for data preparations and those steps are
necessary to put transaction data in to a usable form for processing can be achieved by
inspecting the computer to read data from a written or printed document or it can occur
by having people keying the data directly into the system. The design of input focuses on
controlling the amount of input required, controlling the errors, avoiding the delay,
avoiding the extra steps and keeping the process simple. The input is designed such a way
so that is provides security and ease of use with retaining the privacy. Input design
considered the following things:
Output Design:
A quality output is one, which meets the requirements of the end user and presents the
information clearly. In any system results of processing are communicated to the users
and to other system through outputs. In output design it is determined how the
information is to be displaced for immediate need and also the hard copy output. It is the
most important and direct source information the to the user. Efficient and intelligent
output design improves the system’s relationship to help user decision making.
6.3) Coding
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
#include<time.h>
#include<ctype.h>
class product
{
int pno;
char name[50];
float price,qty,tax,dis;
public:
void create_product()
{
cout<<"\nPlease Enter The Product No. of The Product ";
cin>>pno;
cout<<"\n\nPlease Enter The Name of The Product ";
gets(name);
for(int i=0;i<sizeof(name-1);i++)
{
{
return pno;
}
float retprice()
{
return price;
}
char* retname()
{
return name;
}
float retqty()
{
return qty;
}
int retdis()
{
return dis;
}
};
fstream fp;
product pr;
void write_product()
{
fp.open("Shop.dat",ios::out|ios::app);
pr.create_product();
fp.write((char*)&pr,sizeof(product));
fp.close();
cout<<"\n\nThe Product Has Been Created ";
getch();
}
void display_all()
{
clrscr();
cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n";
fp.open("Shop.dat",ios::in);
while(fp.read((char*)&pr,sizeof(product)))
{
pr.show_product();
cout<<"\n\n====================================\n";
getch();
}
fp.close();
getch();
}
void display_sp(int n)
{
int flag=0;
fp.open("Shop.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<<"\n\nrecord not exist";
getch();
}
void modify_product()
{
int no,found=0;
clrscr();
cout<<"\n\n\tTo Modify ";
cout<<"\n\n\tPlease Enter The Product No. of The Product";
cin>>no;
fp.open("Shop.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 New Details of
Product"<<endl;
pr.create_product();
int pos=-1*sizeof(pr);
fp.seekp(pos,ios::cur);
fp.write((char*)&pr,sizeof(product));
cout<<"\n\n\t Record Updated";
found=1;
}
}
fp.close();
if(found==0)
cout<<"\n\n Record Not Found ";
getch();
}
void delete_product()
{
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();
}
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"<<endl;
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\t\tQuantity\n";
cout<<"============================================\n";
while(fp.read((char*)&pr,sizeof(product)))
{
cout<<pr.retpno()<<"\t\t"<<pr.retname()<<"\t\t"<<pr.retprice()<<"\t\t"<<pr.retqty
()<<endl;
}
fp.close();
}
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<<"********************************SUPER
MARKET************************\n"<<endl;
cout<<"\nPr No.\tPr Name\tQuantity \tPrice \tAmount \tAmount
after discount\n"<<endl;
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();
}
The process of testing is to discover the errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies. It is the process of exercising software with
the intent of ensuring that the software system meets its requirements and user
expectations and does not final in an unacceptable manner.
Unit Testing:
The first level of testing is called unit testing. In this, different modules are tested against
the specifications produced during design for the modules. Unit testing is essentially for
verification of the code produced during the coding phase, and hence the goal is to test
the internal logic of the modules. It is typically done by the programmer of the module. A
module is considered for integration and use by others only after it has been unit tested
satisfactorily.
Integration Testing:
The next level of testing is often called integration testing. In this, many unit tested
modules are combined into subsystems, which are then tested. The goal here is to see if
the modules can be integrated properly. Hence, the emphasis is on testing interfaces
between modules. This testing activity can be considered testing the design.
System Testing:
Here the entire software system is tested. The reference document for this
process is the requirements document, and the goal is to see if the software
meets its requirements. This is essentially a validation exercise, and in
many situation it is the only validation activity. System testing is also
known as black box testing and it is conducted to test the functionality of
the system that is behaving as excepted.
Acceptance Testing:
Acceptance testing is sometimes performed with realistic data of the client to demonstrate
that the software is working satisfactorily. Testing here focuses on the external behavior
of the system. The internal logic of the program is not emphasized. Mostly functional
testing is performed at these levels.
Features to be tested:
Verify that the entries are of the correct format
All links should take to the correct page
8) Snapshots:
Fig1: Menu
Fig4: Bill
9) Future Enhancement