Professional Documents
Culture Documents
A study on
at
1
Maharashtra State Board Of Technical
Education, Mumbai
Certificate
This is to certify that Mr. /Ms. 1) Yogita Sharad Deore.(Roll No: 2131)
2) Sayali Nandu Shinde.(Roll No: 2104)
3) Priyanshu Kishor Chaudhari.(Roll No: 2130)
4) Minal Dharmendra Pande.(Roll No:2127)
5) Kalyani Dipak Sathe.(Roll No:2135)
3
Abstract
In this Micro project, we are demonstrating a simple billing system in c++ programming language.
Simple Billing System is a project that can manage our billing information and the inventory items.
The system will manage some specific details such as Item no, Price, Item Name, Date Manufacture.
The purpose of the system is to effectively manage and maintain the billings of each item.
Introduction
4
Problem definition
Features
It is easy to use.
It is very reliable and accurate.
It is a user friendly system.
5
Resources Required
For the completion of this Micro-Project, we have mainly required the following resources:
Name of the
Serial Number Resource/Material Specifications Quantity Remarks
HP
Laptop(AMD
Hardware/Computer Ryzen 5
(i) 1
System 5600H with
Radeon
Graphics),
Ram = 8GB ,
SSD 528GB
Windows
11 home
(ii) Operating system 1
Turbo C ++
Version - 3.0
(iii) Software 1
6
About the System
The Simple Billing System was created in a simple console application, the system is
openly-accessed you don't need to enter any login information. The user has many
job to do in the system in the system, you can add new Item detail, update current
Item detail, remove item detail, etc. With the use of this system it will greatly help
you for your business transaction. It can fasten your working process by automating
the data input for your inventory. The system will store your data input as a text file
extension. The Simple Billing System was created in a basic C++ programming
principle in order to make any apps simpler and productive.
7
Characteristics
Characteristics of
Edit item simple Billing Delete item detail
detail System
8
Coding Details
#include<iostream>
iostream is the header file which contains all the functions of program like cout, cin etc. its a
header file in c++ which is responsible for input/output stream.
#include<windows.h>
windows.h is a Windows-specific header file for the C and C++ programming languages which
contains declarations for all of the functions in the Windows API, all the common macros used by
Windows programmers, and all the data types used by the various functions and subsystems. It
defines a very large number of Windows specific functions that can be used in C.
#include<conio.h>
conio.h is a C header file used mostly by MS-DOS compilers to provide console input/output.
conio stands for "console input and output".
#include<fstream>
It is used to create files, write information to files, and read information from files. The
fstream term stands for File Stream.
9
#include<cstring>
This header file defines several functions to manipulate C strings and arrays. Cstring is a
header file required for string functions.
#include<cstdio>
The C++ <cstdio> header file includes several macros and functions of C-style input/output
library. This library uses what are called streams to operate with physical devices such as
keyboards, printers, terminals or with any other type of files supported by the system.
#include<cstdlib>
The C++ Standard Library header file (cstdlib in C++) is the header for one of the most
widely used libraries by programmers of the language. This header defines a collection of
functions and macros to facilitate efficient, high-performing, standardized C++ code across
teams and platforms.
#include<iomanip>
The iomanip is a library in C++ which helps us in manipulating the output of any C++
program. There are many functions in this library that help in manipulating the output. To
name a few we have functions to reset flags, set fill characters, set precision, get date and
time, etc.
10
■ Switch case
The switch case statement is widely used for building most of the big projects, which can
be used as actual applications. We have used switch case here to perform different
conditions as per our choice. Switch case statement evaluates a given expression
and based on the evaluated value(matching a certain condition), it executes the
statements associated with it. Basically, it is used to perform different actions
based on different conditions(cases).
Class: A class in C++ is the building block that leads to Object-Oriented programming. It is a
user-defined data type, which holds its own data members and member functions, which
can be accessed and used by creating an instance of that class. A C++ class is like a
blueprint for an object.
A Class is a user defined data-type which has data members and member functions.
Data members are the data variables and member functions are the functions
used to manipulate these variables and together these data members and
member functions defines the properties and behavior of the objects in a Class.
Declaring Objects: When a class is defined, only the specification for the object is defined;
no memory or storage is allocated. To use the data and access functions defined in the
class, you need to create objects.
11
■ Defined member functions
Member functions are operators and functions that are declared as members of a class. Member
functions do not include operators and functions declared with the friend specifier. These are
called friends of a class. You can declare a member function as static; this is called a static member
function. A member function that is not declared as static is called a nonstatic member function.
The definition of a member function is within the scope of its enclosing class. The body of a
member function is analysed after the class declaration so that members of that class can be used
in the member function body, even if the member function definition appears before the
declaration of that member in the class member list. You can use trailing return types for member
functions, including those that have complicated return types.
The public data members are also accessed in the same way given however the private data
members are not allowed to be accessed directly by the object. Accessing a data member depends
solely on the access control of that data member.
This access control is given by Access modifiers in C++. There are three access modifiers : public,
private and protected.
12
Algorithm
Step 1 : start
Step 2 : Display the menu
13
Source code
#include<iostream>
#include<windows.h>
#include<conio.h>
#include<fstream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<iomanip>
int k=7,r=0,flag=0;
0};
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
struct date
int mm,dd,yy;
};
ofstream fout;
ifstream fin;
class item
int itemno;
char name[25];
date d;
14
public:
void add()
cin>>itemno;
cin>>name;
//gets(name);
cin>>d.mm>>d.dd>>d.yy;
void show()
cout<<itemno; cout<<"\n\n\
cout<<name;
cout<<"\n\n\tDate : ";
cout<<d.mm<<"-"<<d.dd<<"-"<<d.yy
void report()
gotoxy(3,k);
cout<<itemno;
gotoxy(13,k);
puts(name);
int retno()
return(itemno);
};
float price,qty,tax,gross,dis,netamt;
15
public:
void add();
void show();
void report();
void calculate();
void pay();
float retnetamt()
return(netamt);
} amt;
void amount::add()
item::add(); cout<<"\n\n\
cout<<"\n\n\tQuantity: ";
cin>>qty;
cin>>tax;
cin>>dis;
calculate();
fout.write((char *)&amt,sizeof(amt));
fout.close();
void amount::calculate()
gross=price+(price*(tax/100));
netamt=qty*(gross-(gross*(dis/100)))
void amount::show()
fin.open("itemstore.dat",ios::binary);
fin.read((char*)&amt,sizeof(amt));
item::show();
16
cout<<netamt;
fin.close();
void amount::report()
item::report();
gotoxy(23,k);
cout<<price;
gotoxy(33,k);
cout<<qty;
gotoxy(44,k);
cout<<tax;
gotoxy(52,k);
cout<<dis;
gotoxy(64,k);
cout<<netamt;
k=k+1;
if(k==50)
gotoxy(25,50);
getch();
k=7;
system("cls");
gotoxy(30,3);
gotoxy(3,5);
cout<<"NUMBER";
gotoxy(13,5);
cout<<"NAME";
gotoxy(23,5);
cout<<"PRICE";
gotoxy(33,5);
cout<<"QUANTITY";
gotoxy(44,5);
cout<<"TAX"
gotoxy(52,5);
17
cout<<"DEDUCTION";
gotoxy(64,5);
cout<<"NET AMOUNT";
void amount::pay()
show(); cout<<"\n\n\n\t\
t*********************************************"; cout<<"\n\t\t
t*********************************************"; cout<<"\n\n\t\
tPRICE :"<<price;
cout<<"\n\n\t\tQUANTITY :"<<qty;
cout<<"\n\n\n\t\tNET AMOUNT :
$"<<netamt;
cout<<"\n\t\t*********************************************";
int main()
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout<<setprecision(2);
fstream tmp("temp.dat",ios::binary|ios::out);
menu:
system("cls");
gotoxy(27,2);
gotoxy(25,3);
cout<<"=========================\n\n";
n";
int ch,ff;
18
float gtotal;
cin>>ch;
switch(ch)
case 1:
ss:
system("cls");
gotoxy(25,2);
cout<<"Bill Details";
gotoxy(25,3);
cout<<"================\n\n";
cin>>cho;
if(cho==1)
system("cls");
gotoxy(30,3);
gotoxy(3,5);
cout<<"ITEM NO";
gotoxy(13,5);
cout<<"NAME";
gotoxy(23,5);
cout<<"PRICE";
gotoxy(33,5);
cout<<"QUANTITY";
gotoxy(44,5);
cout<<"TAX %";
gotoxy(52,5);
cout<<"DISCOUNT %";
gotoxy(64,5);
cout<<"NET AMOUNT";
fin.open("itemstore.dat",ios::binary); if(!
fin)
19
cout<<"\n\nFile Not Found...";
goto menu;
fin.seekg(0);
gtotal=0;
while(!fin.eof())
fin.read((char*)&amt,sizeof(amt));
if(!fin.eof())
amt.report();
gtotal+=amt.retnetamt();
ff=0;
if(ff!=0) gtotal=0;
gotoxy(17,k);
cout<<"\n\n\n\t\t\tGrand Total="<<gtotal;
getch();
fin.close();
if(cho==2)
goto menu;
goto ss;
case 2:
db:
system("cls");
gotoxy(25,2);
cout<<"Bill Manager";
gotoxy(25,3);
cout<<"=================\n\n";
int apc;
20
cin>>apc;
switch(apc)
case 1:
fout.open("itemstore.dat",ios::binary|ios::app);
amt.add();
getch();
goto db;
case 2:
int ino;
flag=0;
cin>>ino;
fin.open("itemstore.dat",ios::binary);
fout.open("itemstore.dat",ios::binary|ios::app);
if(!fin)
goto menu;
fin.seekg(0);
r=0;
while(!fin.eof())
fin.read((char*)&amt,sizeof(amt));
if(!fin.eof())
int x=amt.item::retno();
if(x==ino)
flag=1;
fout.seekp(r*sizeof(amt));
system("cls");
amt.show();
21
amt.add();
} r+
+;
if(flag==0)
getch();
goto db;
fin.close();
getch();
goto db;
case 3:
flag=0;
cin>>ino;
fin.open("itemstore.dat",ios::binary); if(!
fin)
goto menu;
fin.seekg(0);
while(fin.read((char*)&amt, sizeof(amt)))
int x=amt.item::retno();
if(x!=ino)
tmp.write((char*)&amt,sizeof(amt));
else
flag=1;
22
fin.close();
tmp.close();
fout.open("itemstore.dat",ios::trunc|ios::binary);
fout.seekp(0); tmp.open("temp.dat",ios::binary|
ios::in); if(!tmp)
cout<<"Error in File";
goto db;
while(tmp.read((char*)&amt,sizeof(amt)))
fout.write((char*)&amt,sizeof(amt));
tmp.close();
fout.close();
if(flag==1)
else if (flag==0)
getch();
goto db;
case 4:
goto menu;
default:
getch();
goto db;
case 3:
system("cls");
flag=0;
int ino;
cin>>ino;
fin.open("itemstore.dat",ios::binary);
if(!fin)
goto menu;
23
}
fin.seekg(0);
while(fin.read((char*)&amt,sizeof(amt)))
int x=amt.item::retno();
if(x==ino)
amt.pay();
flag=1;
break;
if(flag==0)
getch();
fin.close();
goto menu;
case 4:
system("cls");
gotoxy(20,20);
char yn;
cin>>yn;
if((yn=='Y')||(yn=='y'))
gotoxy(12,20);
system("cls");
getch();
exit(0);
else if((yn=='N')||(yn=='n'))
goto menu;
else
goto menu;
default:
24
cout<<"\n\n\t\tWrong Choice....Please Retry!";
getch();
goto menu;
return 0;
2. Collected the information about the Micro-Project from Internet and textbooks
of curriculum.
3. Practically testing of the Micro-Project i.e. ,Written and executed the finalized program.
4. Gathered and analyzed all this information. After that, finally created the report of this
Micro-Project.
25
Testing and execution of the program
When we execute the prepared coding on output-screen, the following output is shown.
26
27
28
29
30
31
Conclusion
We have studied and executed the program of C ++ i.e. Simple Billing System successfully.
From this, we have understood various concepts of object oriented programming. We had
tried our best to include basic features of OOP in our project. We aimed it to be an
interfacing application to the real world that means our project must not be an project for
any examination but also applicable for real world use. We have able to give some benefits
to the disability. From this project we were able to achieve various knowledge in Object
Orientated Programming. We refresh our knowledge in C++ Programming. Moreover, we
also gained an experience of group work, team coordination.
32
References
https://www.programmingsimplified.com
https://www.javatpoint.com
https://developerinsider.com
https://www.tutorialspoint.com
33
Weekly Work / Progress Report
Details of 16 Engagement Hours of the Student
34
ANNEXURE-II
Evaluation Sheet for the Micro Project (Teachers Copy)
the Project:
1. Basic knowledge
2. Discipline knowledge
1. Processing information
2. Constructing
3. Understanding
4. Applying knowledge
35
□ Comment/Suggestions about team work/leadership/inter-personal
( )
36