0% found this document useful (0 votes)
73 views27 pages

Certificate: Super Market Billing

This document is a certificate for a student who completed a practical course and project work on Super Market Billing as part of their CBSE syllabus computer science course at All Saints' Public School and Junior College in Adoor. It includes an index listing the program components like an overview of C++, introduction, system requirements, header files used, classes and objects, functions, program code, and bibliography.

Uploaded by

Gauri Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views27 pages

Certificate: Super Market Billing

This document is a certificate for a student who completed a practical course and project work on Super Market Billing as part of their CBSE syllabus computer science course at All Saints' Public School and Junior College in Adoor. It includes an index listing the program components like an overview of C++, introduction, system requirements, header files used, classes and objects, functions, program code, and bibliography.

Uploaded by

Gauri Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

SUPER MARKET BILLING

CERTIFICATE

NAME OF THE INSTITUTION : All Saints’ Public School and Junior College

PLACE : Adoor

This is to certify that ………………………………………………………………..

Roll No: …......................................... studying in ……………….. in the year 2019-2020 of the


institution has completed a practical course based on CBSE syllabus in COMPUTER
SCIENCE and has completed the project work during the year 2019-2020.

Teacher – in – charge Principal

Internal Examiner External Examiner

1|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

ACKNOWLEDGEMENT

I would like to express my gratitude to my teachers SUBHA SHIBU


MATHEW,RINSA REES and AJISHA as well as our principal GEORGE KUTTY
VL who all gave me the golden opportunity to do this wonderful project ion the
topic SUPERMARKET BILLING . The topic itself helped me in building up a
great glossary of knowledge through research and dedication I have given in this
project.

I would also like to thank my parents and my friends who helped me a lot in
finalizing this project within the limited time frame.

2|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

Index
S No. Program Page No.
1 C++ Overview
2 Introduction
3 System Requirements
4 Header Files used
5 Class and Objects used
6 Functions used
7 Program Code
8 Output
9 Bibliography

3|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

C++ OVERVIEW
C++ is a statistically typed , compiled , general – purpose, case –sensitive, free –
form programming language that supports procedural , object oriented, and generic
programming.

C++ is regarded as a middle – level language, as it comprises a combination of


both high –level and low-level language features.

C++ was developed by Bjarne Stroustrap starting in 1979 at Bell Labs in Murray
Hill, New Jersey, as an enhancement to the C language and originally named C
with Classes but later it was renamed in 1983.

C++ is a superset of C, and that virtually any legal C program is a legal C++
program. C++ fully supports object-oriented programming, including the four
pillar of object –oriented development.

 Encapsulation

 Data hiding

 Inheritance

 Polymorphism

4|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

INTRODUCTION

The project is on Super market billing. Super Market is the place where customers
come to purchase their daily goods and pay for them. So there is a need to calculate
how many products are sold and to generate the bill for the customer.

In our project we have 2 users. First one is the administrator who will decide the
taxes and commissions on the products and can see the report of any product.
He is the one who will decide the products available for customers. The second one
is the customer or the billing manager who can purchase the items available or can
make the bill for the customers.

This project can also be used for online purchasing as the customer can access it
easily.

5|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

SYSTEM REQUIREMENTS

 HARDWARE SPECIFICATION AND MACHINE USED:

1. KEYBOARD Standard PS/2

2. MONITOR Generic PnP

3. CPU 3.20 GHz

4. MOUSE HID-compliant mouse

5. CD

 SOFTWARE(OS.LANGUAGE) USED ALONG WITH VERSION:

1. OPERATING SYSTEM WINDOWS 7

2. MS OFFICE MS WORD 2007

3. LANGUAGE C LANGUAGE

4. VERSION TURBO C7

6|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

HEADER FILES USED

 #include<conio.h>

 #include<stdio.h>

 #include<process.h>

 #include<fstream.h>

7|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

CLASS AND OBJECTS USED


 CLASS

Product

 OBJECTS

pr

8|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

FUNCTIONS USED

1.void create_product()
2.void show_product()
3.int retpno()
4. float retprice()
5. char retname()
6. int retdis()
7. void write_product()
8. pr create_product()
9. void display_all()
10. pr show_product()
11. void displaysp(int n)
12. void modify_product()
13. void delete_product()
14.void place_order
15. void intro()
16. void admin_menu()

9|ALL SAINTS’ PUBLIC SCHOOL AND JUNIOR COLLEGE


SUPER MARKET BILLING

Source code
#include<iostream.h>

#include<conio.h>

#include<fstream.h>

#include<stdio.h>

class product

int pr_no;

char name[30];

float price,qty;

public:

void main_menu();//to dispay the main menu

void add(); //to add a product to the menu

void display(); //to display the product record

void edit(); //to edit the product record

int check(int); //to check product status

void modify(int); //to modify the product record

void delete_rec(int); //to delete the product record

10 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

};

void product::main_menu()

int choice;

while(choice!=4)

clrscr();

cout<<"\n\t\t\t\t*************";

cout<<"\n\t\t\t\t* MAIN MENU *";

cout<<"\n\t\t\t\t*************";

cout<<"\n\n\n\t\t\t1.Add a product";

cout<<"\n\t\t\t2.Product Record";

cout<<"\n\t\t\t3.Edit Record";

cout<<"\n\t\t\t4.Exit";

cout<<"\n\n\t\t\tEnter Your Choice: ";

cin>>choice;

switch(choice)

case 1: add();
11 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

break;

case 2: display();

break;

case 3: edit();

break;

case 4: break;

default:

cout<<"\n\n\t\t\tWrong choice!!!";

cout<<"\n\t\t\tPress any key to continue!!";

getch();

void product::add()

clrscr();

int r,flag;

ofstream fout("shop.dat",ios::app);

12 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

cout<<"\n Enter Product Details";

cout<<"\n **********************";

cout<<"\n\n Product no: ";

cin>>r;

flag=check(r);

if(flag)

cout<<"\n Sorry..!!!Product not found";

else

pr_no=r;

cout<<" Name: ";

gets(name);

cout<<" Price: ";

cin>>price;

cout<<" Qty: ";

cin>>qty;

fout.write((char*)this,sizeof(product));

cout<<"\n Product is added !!!";

cout<<"\n Press any key to continue!!";

getch();
13 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

fout.close();

void product::display()

clrscr();

ifstream fin("shop.dat",ios::in);

int r,flag;

cout<<"\n Enter product no: ";

cin>>r;

while(!fin.eof())

fin.read((char*)this,sizeof(product));

if(pr_no==r)

clrscr();

cout<<"\n Product Details";

cout<<"\n ****************";

cout<<"\n\n Product no: "<<pr_no;

cout<<"\n Name: "<<name;

cout<<"\n price: "<<price;


14 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

cout<<"\n Quantity: "<<qty;

flag=1;

break;

if(flag==0)

cout<<"\n Sorry Product no. not found !!";

cout<<"\n\n Press any key to continue!!";

getch();

fin.close();

void product::edit()

clrscr();

int choice,r;

cout<<"\n EDIT MENU";

cout<<"\n *********";

cout<<"\n\n 1.Modify Product Record";


15 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

cout<<"\n\n 2.Delete Product Record";

cout<<"\n Enter your choice: ";

cin>>choice;

clrscr();

cout<<"\n Enter product no: ";

cin>>r;

switch(choice)

case 1: modify(r);

break;

case 2: delete_rec(r);

break;

default: cout<<"\n Wrong Choice!!";

cout<<"\n Press any key to continue!!!";

getch();

int product::check(int r)

int flag=0;
16 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

ifstream fin("shop.dat",ios::in);

while(!fin.eof())

fin.read((char*)this,sizeof(product));

if(pr_no==r)

flag=1;

break;

fin.close();

return(flag);

void product::modify(int r)

long pos,flag=0;

fstream file("shop.dat",ios::in|ios::out|ios::binary);

while(!file.eof())

{
17 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

pos=file.tellg();

file.read((char*)this,sizeof(product));

if(pr_no==r)

cout<<"\n Enter New Details";

cout<<"\n *****************";

cout<<"\n Name: ";

gets(name);

cout<<" Price: ";

cin>>price;

cout<<" Quantity: ";

cin>>qty;

file.seekg(pos);

file.write((char*)this,sizeof(product));

cout<<"\n Product Record is modified!!";

flag=1;

break;

if(flag==0)

cout<<"\n Sorry Product not found ";


18 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

file.close();

void product::delete_rec(int r)

int flag=0;

char ch;

ifstream fin("shop.dat",ios::in);

ofstream fout("temp1.dat",ios::out);

while(!fin.eof())

fin.read((char*)this,sizeof(product));

if(pr_no==r)

cout<<"\n Name: "<<name;

cout<<"\n Price: "<<price;

cout<<"\n Qty: "<<qty;

cout<<"\n\n Do you want to delete this product record(y/n): ";

cin>>ch;

19 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

if(ch=='n')

fout.write((char*)this,sizeof(product));

flag=1;

else

fout.write((char*)this,sizeof(product));

fin.close();

fout.close();

if(flag==0)

cout<<"\n Sorry product not found !!";

else

remove("shop.dat");

rename("temp1.dat","shop.dat");

void main()
20 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

product h;

clrscr();

cout<<"\n\t\t\t******************************\n";

cout<<"\n\t\t\t* Super Market Product Details\n";

cout<<"\t\t\t******************************\n";

getch();

h.main_menu();

21 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

22 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

23 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

24 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

25 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

Bibliography

26 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E
SUPER MARKET BILLING

 Text books
1. Computer science with C++(Sumita Arora)

Websites:

27 | A L L S A I N T S ’ P U B L I C S C H O O L A N D J U N I O R C O L L E G E

You might also like