You are on page 1of 23

[Type the document title]

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.

The project “supermarket billing system” is developed with the objective of


making the system reliable, easier, fast, and more informative.

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.

[Type text] Page 1


[Type the document title]

CONTENTS

1) Introduction

1.1) Objectives

1.2) Scope

2) System analysis

2.1) Existing System

2.2) Proposed System

2.3) Modules

3) Requirement Analysis

3.1) Purpose and scope

3.2) Users of the system

4) Tools and Technologies used

4.1) Introduction to c++

4.2) Introduction to File Handling

4.3) Introduction to Turbo c++

5) System Requirements

5.1) Hardware requirements

5.2) Software requirements

[Type text] Page 2


[Type the document title]

6) System Design

6.1) Data Flow diagram

6.2) Input design and output design

6.3) Coding

6.4) Test Cases

7) Testing and result

7.1) Types of testing

7.2) Testing Strategies

7.3) Testing Guidelines

7.4) Test case design related to our project as follows

7.5) Over all testing process for our application is as follows

8) Snapshots

9) Future Enhancement

10) Conclusion

[Type text] Page 3


[Type the document title]

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.

[Type text] Page 4


[Type the document title]

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.

2.1) Existing System:

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.

2.2) Proposed System:

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:

1. Reduction in processing cost.

2. Error reduction.

3. Faster response time.

4. Ability to meet user requirements.

5. Flexibility.

6. Reduced dependency.

7. Improves resource uses.

[Type text] Page 5


[Type the document title]

8. Reduction in use of the paper and man power.

Proposed system has these qualities including the qualities of the existing system.

2.3) Modules:

In our project we have mainly 2 modules. They are:

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.

[Type text] Page 6


[Type the document title]

3) Requirement analysis

[Type text] Page 7


[Type the document title]

4) Tools and Technologies used

4.1) Introduction to c++:

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.

C++ is a general purpose, case-sensitive, free-form programming language that


supports object-oriented, procedural and generic programming. C++ is a middle-level
language, as it encapsulates both high and low level language features.

4.2) Introduction to File Handling:

In C++, files are mainly dealt by using three classes fstream, ifstream, ofstream available
in fstream header file.

 ofstream: Stream class to write on files


 ifstream: Stream class to read from files
 fstream: Stream class to both read and write from/to files.

[Type text] Page 8


[Type the document title]

Fig 1. Block diagram for File handling

Sr.No Mode Flag & Description

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.

Fig 2. Flags and description

[Type text] Page 9


[Type the document title]

4.3) Introduction to Turbo c++

Turbo C++ is a discontinued C++ compiler and integrated development


environment and computer language originally from Borland. It was designed as a home
and hobbyist counterpart for the Borland C++. As the developer had focused more on
professional programming tools, later Turbo C++ products were made as scale down
versions of the professional compilers.

5) System Requirement Specification:

5.1) Software Specification:

 Operating System :- Windows 8


 Coding Language :- C++
 Supporting Tools :- Turbo C++, Dev C++

5.2) Hardware Specification:

 Hard disk :- 500 GB


 RAM :- 1 GB
 Processor :- Intel® Celeron® 2.13GHz

[Type text] Page 10


[Type the document title]

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.

[Type text] Page 11


[Type the document title]

6.2) Input Design and Output Design:

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:

 What data should be given as input ?


 How the data should be arranged or coded?
 Methods for preparing input validations and steps to follow when error
occurs.

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.

[Type text] Page 12


[Type the document title]

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++)
{

if(!(isalpha(name[i])) || (name[i]==' ') ||(isspace(name[i])))


{
cout<<"Enter product name";
cin>>name;
}
}
cout<<"\nPlease Enter the Quantity";
cin>>qty;
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 Number of quantity:"<<qty;
cout<<"\nThe Price of The Product : "<<price;
cout<<"\nDiscount : "<<dis;
}
int retpno()

[Type text] Page 13


[Type the document title]

{
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();
}

[Type text] Page 14


[Type the document title]

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();
}

[Type text] Page 15


[Type the document title]

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)))
{

[Type text] Page 16


[Type the document title]

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));

[Type text] Page 17


[Type the document title]

}
fp.close();
}
cout<<"\n\n\t\t\t\t\tTOTAL = "<<total;
getch();
}

6.4) Test Cases:

SL No Test Case Input Excepted Actual Valid/


Name Output Output invalid
1 Product Fastrack123 Product should not Product name Invalid
Name contain number is invalid
Fastrack Product name Valid product Valid
contains only name
alphabets
2 Product Abcd Product number Product Invalid
Number should not contain number is
alphabets invalid
12345 Product number Valid product valid
contains only digits number

[Type text] Page 18


[Type the document title]

7) Testing and result

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.

7.1) Types of testing:

 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.

[Type text] Page 19


[Type the document title]

 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.

7.2) Testing Strategies:


Field testing will be performed manually and functional tests will be written
in detail.
Test objectives:
 All fields entries must work properly
 Pages must be activated from identified link

Features to be tested:
 Verify that the entries are of the correct format
 All links should take to the correct page

7.3) Testing Guidelines:


Testing guidelines are hints for the testing team to help them choose tests that will reveal
defects in the system.
 Choose inputs that force the system to generate all error messages
 Design inputs that cause buffers to overflow
 Repeat the same input or input series several times
 Force invalid outputs to be generated
 Force invalid outputs to be generated

7.4) Test case design related to our project as follows


Information maintenance system requirements
 The admin shall be able to search or access all the information from the file.
 The system shall provide appropriate information about the product.
 Every information details are verified and store to the file

7.5) Over all testing process for our application is as follows


 Each individual module is tested for good results
 Product name should contain only characters and not contain digits
 Product number should contain only numbers not alphabets

[Type text] Page 20


[Type the document title]

8) Snapshots:

Fig1: Menu

Fig2: Admin Menu

[Type text] Page 21


[Type the document title]

Fig3: Product menu

Fig4: Bill

[Type text] Page 22


[Type the document title]

9) Future Enhancement

[Type text] Page 23

You might also like