SlideShare a Scribd company logo
1 of 23
CERTIFICATE
This is to certify that Sudhindra Mudhol of class
XII B has satisfactorily and successfully completed the
investigatory project in Computer Science as prescribed by
CBSE for AISSCE course, in the Computer Science
laboratory of Kendriya Vidyalaya 2, Jalahalli East, in the
academic session 2013-2014.
Roll No :
Date :
Signature: External Examiner
Signature: Teacher in charge
AKNOWLEDGEMENT
I offer my sincere thanks to my Computer
Science teacher Mrs. Leena.U (PGT Computer
Science), for her valuable guidance and advice. I
am also thankful to her for giving me useful
suggestions and relevant ideas which facilitated
an easy completion of this project.
I am also thankful to our Principal mam
Mrs. Suleena Nair, and my School - Kendriya
Vidyalaya No.2 for giving me such an
opportunity to work on this Investigatory
Project.
- Sudhindra Mudhol
INDEX (CONTENTS)
Introduction
Project requirements
Source code
Output gallery
Bibliography
INTRODUCTION
Most computer programs work with the files
because files help in storing information
permanently. Word processors create
documents files.
Database programs create document files.
Compilers reads source files and generate
executable files. So, a file itself is a bunch of
bytes stored on some storage device. In C++, file
input/output facilities are implemented
through a component header file of C++
standard library. This header file is fstream.h. It
helps in file manipulation which is closer to the
real world.
Project
requirments
Turbo C++ software.
Microsoft paint.
Microsoft Office.
Computer system
requirments
A 32 bit or 64 bit Operating system .
Windows XpTM
or Higher version .
Intel PentiumTM
, Intel Core2DuoTM
or Higher version Chip set .
Command prompt TURBO C++ .
PROGRAMMING
(Source code)
//***********************************************
// STAR BILLING SYSTEM
// Header Files Included
#include<iostream.h>
#include<iomanip.h>
#include<conio.h>
#include<process.h>
#include<stdio.h>
#include<fstream.h>
#include<string.h>
//Function prototype declaration
void main_menu();
void add_shop();
void show_shop();
void rem_shop();
void mod_shop();
void cus_slip();
// Global Variables
char g;
float today_sale=0;
class shop // Class for the products' records
{
int code;
float price;
char name[32];
public :
void getdata()
{
cout<<"nEnter Item code => ";
cin>>code;
cout<<"nEnter Item name => ";
gets(name);
cout<<"nEnter Price => ";
cin>>price;
}
void putdata()
{
cout<<"Item Code => "<<code<<"t Price => "<<price<<"t Name => ";
puts(name);
}
int getcode()
{
return code;
}
float getp()
{
return price;
}
}; //end of class
void main() // Main Function of the program
{
clrscr();
char n[32];
cout<<"nnEnter username => ";
cin>>n;
if( ( (strcmp(n,"Kunal")==0) || (strcmp(n,"Mohit")==0)||(strcmp(n,”Sudhi”)==0) ) )
{ main_menu(); }
else
{
cout<<"nInvalid Username !!! ";
cout<<"nDo you want to retry (y/n) => ";
cin>>g;
if (g=='y') { main(); }
else { exit(0); }
}
getch();
} // End of the main function
void main_menu() // Function for displaying main_menu
{
clrscr();
cout<<"ntt*********************";
textattr(9+128);
textbackground(15);
cprintf(" t AFWWA t ");
textattr(15);
cout<<"************************";
cout<<"ntt ( Air Force Wives Welfare Association )";
int ch;
cout<<"nChoose from the selected option(s) --> nn";
textattr(6);
cprintf("1 . Add item to the Shop "); cout<<endl;
cprintf("2 . Remove item from the the Shop "); cout<<endl;
cprintf("3 . Modify Details of a item"); cout<<endl;
cprintf("4 . Show all available items"); cout<<endl;
cprintf("5 . Customer Slip"); cout<<endl;
cprintf("6 . Today's sale "); cout<<endl;
cprintf("7 . Exit");
cout<<"nnEnter your choice => ";
cin>>ch;
switch(ch)
{
case 1:
add_shop();
break;
case 2:
rem_shop();
break;
case 3:
mod_shop();
break;
case 4:
show_shop();
break;
case 5:
cus_slip();
break;
case 6:
{
clrscr();
cout<<"nToday's total sale => "<<today_sale;
cout<<"nnnDo you want to go to main menu (y/n) => ";
cin>>g;
if(g=='y')
main_menu();
}
break;
case 7:
exit(0);
break;
default:
cout<<"nInvalid Choice !!n";
cout<<"nChoose againn";
} //Switch case closed
} //End of main function
void add_shop() // Function to adding items to Shop
{
clrscr();
textattr(15);
cout<<"ntt*********************";
textbackground(15);
textattr(9);
cprintf(" t AFWWA t ");
cout<<"************************ntt ( Air Force Wives Welfare Association )";
fstream f1;
shop s1;
char c='y';
f1.open("affwa.txt",ios::app|ios::binary);
while(c== 'y')
{
cout<<"nnEnter the detail of the Item => ";
s1.getdata();
f1.write( (char*)&s1,sizeof(s1));
cout<<"nDo you want to enter more details (y/n) => ";
cin>>c;
}
f1.close();
cout<<"nDo you want to go main menu (y/n) => ";
cin>>g;
if(g=='y')
{
clrscr();
main_menu();
}
else
{ exit(0); }
} // End of add_shop() function
void show_shop() // Function to show all available items
{
clrscr();
fstream f1;
shop s1;
cout<<"nt**** Item list ****n";
f1.open("affwa.txt",ios::in|ios::binary);
f1.seekg(0,ios::beg);
while(!f1.eof())
{
f1.read((char*)&s1,sizeof(s1));
cout<<"n";
s1.putdata();
}
f1.close();
cout<<"nDo you want to go to main menu (y/n) => ";
cin>>g;
if(g=='y')
main_menu();
else
exit(0);
} // End of show_shop() function
void mod_shop() // Function for modifying details of items
{
clrscr();
int k;
fstream f1;
shop s1;
cout<<"nEnter the item code whoose data is to be modified => ";
cin>>k;
f1.open("affwa.txt",ios::in|ios::binary);
f1.seekg(0,ios::beg);
int pos;
while(!f1.eof())
{
pos=f1.tellg();
f1.read((char*)&s1,sizeof(s1));
if ( k==s1.getcode() )
{
cout<<"nEnter new details => n";
s1.getdata();
f1.seekp(pos);
f1.write((char*)&s1,sizeof(s1));
break;
}
}
f1.close();
main_menu();
}
void rem_shop() // Function for removing the details of a item
{
clrscr();
fstream m1,m2;
shop s1;
m1.open("affwa.txt",ios::in|ios::out|ios::binary);
m2.open("a_temp.txt",ios::out|ios::binary);
m1.seekg(0,ios::beg);
int k;
cout<<"nnEnter the item code whose record you want to delete => ";
cin>>k;
while(!m1.eof())
{
m1.read((char*)&s1,sizeof(s1));
if ( k==s1.getcode() ) { }
else { m2.write((char*)&s1,sizeof(s1)); }
}
m1.close();
m2.close();
remove("affwa.txt");
rename("a_temp.txt","affwa.txt");
cout<<"nThe item has been removed !!n ";
cout<<"nDo you want to go to main menu (y/n) => ";
cin>>g;
if(g=='y')
{
clrscr();
main_menu();
}
else { exit(0); }
}
void cus_slip() // Function for displaying customers’ bill
{
clrscr();
cout<<"ntt*************** Customer Slip **************nnn";
fstream f1;
shop s;
int qty;
float cost , tot_cost=0;
int tno;
f1.open("affwa.txt",ios::in|ios::binary);
f1.seekp(0,ios::beg);
char ch='y';
while(ch=='y') // while 1
{
while( !f1.eof()) // while 2
{
f1.read((char*)&s,sizeof(s));
cout<<"nEnter the item no .=> ";
cin>>tno;
if( (s.getcode())==tno ) // if 1
{
cout<<"nEnter quantity => ";
cin>>qty;
cost=qty*(s.getp());
tot_cost+=cost;
today_sale+=tot_cost;
cout<<"nCost => "<<cost;
} // if 1
cout<<"nDo you want to enter more items to your cart (y/n) => ";
cin>>ch;
if(ch=='y') { continue; }
else { break; }
} // while 2
} // while 1
f1.close();
cout<<"nnnTotal Amount to be paid by the Customer => "<<tot_cost;;
cout<<"nnDo you want to go to main menu (y/n) => ";
cin>>g;
if(g=='y') { main_menu(); }
}
Output gallery
1. Main Screen
2. Adding Items to the shop
3. All items Display
4. Customer Slip
BIBLOGRAPHY
Computer Science with C++ for Class XII
by Sumita Arora.
Computer Science Support Material,
2013-14 by Kendriya Vidyalaya
Sangathan.
Together with Computer Science
Textbook.

More Related Content

What's hot

class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In PythonAbhishekKumarMorla
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)lokesh meena
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Pythonvikram mahendra
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdfHarshitSachdeva17
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory ProjectPrakhar Seth
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking systemAnurag Yadav
 
Employee Management (CS Project for 12th CBSE)
Employee Management (CS Project for 12th CBSE)Employee Management (CS Project for 12th CBSE)
Employee Management (CS Project for 12th CBSE)PiyushKashyap54
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 
A project report on libray mgt system
A project report on libray mgt system A project report on libray mgt system
A project report on libray mgt system ashvan710883
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSESylvester Correya
 
CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL Rishabh-Rawat
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12RithuJ
 
CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12anekant28
 
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18HIMANSHU .
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQLDarshit Vaghasiya
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...ArkaSarkar23
 
Sterlization of water using bleaching powder
Sterlization of water using bleaching powder Sterlization of water using bleaching powder
Sterlization of water using bleaching powder Gaurav Sharma
 
computer science project class 12th
computer science project class 12thcomputer science project class 12th
computer science project class 12thNitesh Kushwaha
 
Store management along with output
Store management along with outputStore management along with output
Store management along with outputAnavadya Shibu
 

What's hot (20)

class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory Project
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking system
 
Employee Management (CS Project for 12th CBSE)
Employee Management (CS Project for 12th CBSE)Employee Management (CS Project for 12th CBSE)
Employee Management (CS Project for 12th CBSE)
 
Ip project
Ip projectIp project
Ip project
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
A project report on libray mgt system
A project report on libray mgt system A project report on libray mgt system
A project report on libray mgt system
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
 
CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12
 
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
 
Sterlization of water using bleaching powder
Sterlization of water using bleaching powder Sterlization of water using bleaching powder
Sterlization of water using bleaching powder
 
computer science project class 12th
computer science project class 12thcomputer science project class 12th
computer science project class 12th
 
Store management along with output
Store management along with outputStore management along with output
Store management along with output
 

Similar to CS Project-Source code for shopping inventory for CBSE 12th

Similar to CS Project-Source code for shopping inventory for CBSE 12th (20)

Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Oop lab report
Oop lab reportOop lab report
Oop lab report
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
OOPS 22-23 (1).pptx
OOPS 22-23 (1).pptxOOPS 22-23 (1).pptx
OOPS 22-23 (1).pptx
 
CSNB244 Lab5
CSNB244 Lab5CSNB244 Lab5
CSNB244 Lab5
 
Dartprogramming
DartprogrammingDartprogramming
Dartprogramming
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 
classes & objects in cpp overview
classes & objects in cpp overviewclasses & objects in cpp overview
classes & objects in cpp overview
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 
classes & objects in cpp
classes & objects in cppclasses & objects in cpp
classes & objects in cpp
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
 
Sample file processing
Sample file processingSample file processing
Sample file processing
 
computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdf
 
Durgesh
DurgeshDurgesh
Durgesh
 
Computer Practical XII
Computer Practical XIIComputer Practical XII
Computer Practical XII
 
Opp compile
Opp compileOpp compile
Opp compile
 
Presentation on template and exception
Presentation  on template and exceptionPresentation  on template and exception
Presentation on template and exception
 
Pre zen ta sion
Pre zen ta sionPre zen ta sion
Pre zen ta sion
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

CS Project-Source code for shopping inventory for CBSE 12th

  • 1.
  • 2. CERTIFICATE This is to certify that Sudhindra Mudhol of class XII B has satisfactorily and successfully completed the investigatory project in Computer Science as prescribed by CBSE for AISSCE course, in the Computer Science laboratory of Kendriya Vidyalaya 2, Jalahalli East, in the academic session 2013-2014. Roll No : Date : Signature: External Examiner
  • 3. Signature: Teacher in charge AKNOWLEDGEMENT I offer my sincere thanks to my Computer Science teacher Mrs. Leena.U (PGT Computer Science), for her valuable guidance and advice. I am also thankful to her for giving me useful suggestions and relevant ideas which facilitated an easy completion of this project. I am also thankful to our Principal mam Mrs. Suleena Nair, and my School - Kendriya Vidyalaya No.2 for giving me such an
  • 4. opportunity to work on this Investigatory Project. - Sudhindra Mudhol INDEX (CONTENTS) Introduction Project requirements
  • 5. Source code Output gallery Bibliography INTRODUCTION Most computer programs work with the files because files help in storing information permanently. Word processors create documents files. Database programs create document files. Compilers reads source files and generate executable files. So, a file itself is a bunch of bytes stored on some storage device. In C++, file
  • 6. input/output facilities are implemented through a component header file of C++ standard library. This header file is fstream.h. It helps in file manipulation which is closer to the real world. Project requirments Turbo C++ software. Microsoft paint.
  • 7. Microsoft Office. Computer system requirments A 32 bit or 64 bit Operating system . Windows XpTM or Higher version .
  • 8. Intel PentiumTM , Intel Core2DuoTM or Higher version Chip set . Command prompt TURBO C++ . PROGRAMMING (Source code) //*********************************************** // STAR BILLING SYSTEM // Header Files Included #include<iostream.h> #include<iomanip.h>
  • 9. #include<conio.h> #include<process.h> #include<stdio.h> #include<fstream.h> #include<string.h> //Function prototype declaration void main_menu(); void add_shop(); void show_shop(); void rem_shop(); void mod_shop(); void cus_slip(); // Global Variables char g; float today_sale=0; class shop // Class for the products' records { int code; float price; char name[32]; public : void getdata() { cout<<"nEnter Item code => ";
  • 10. cin>>code; cout<<"nEnter Item name => "; gets(name); cout<<"nEnter Price => "; cin>>price; } void putdata() { cout<<"Item Code => "<<code<<"t Price => "<<price<<"t Name => "; puts(name); } int getcode() { return code; } float getp() { return price; } }; //end of class void main() // Main Function of the program { clrscr();
  • 11. char n[32]; cout<<"nnEnter username => "; cin>>n; if( ( (strcmp(n,"Kunal")==0) || (strcmp(n,"Mohit")==0)||(strcmp(n,”Sudhi”)==0) ) ) { main_menu(); } else { cout<<"nInvalid Username !!! "; cout<<"nDo you want to retry (y/n) => "; cin>>g; if (g=='y') { main(); } else { exit(0); } } getch(); } // End of the main function void main_menu() // Function for displaying main_menu { clrscr(); cout<<"ntt*********************"; textattr(9+128); textbackground(15); cprintf(" t AFWWA t "); textattr(15); cout<<"************************";
  • 12. cout<<"ntt ( Air Force Wives Welfare Association )"; int ch; cout<<"nChoose from the selected option(s) --> nn"; textattr(6); cprintf("1 . Add item to the Shop "); cout<<endl; cprintf("2 . Remove item from the the Shop "); cout<<endl; cprintf("3 . Modify Details of a item"); cout<<endl; cprintf("4 . Show all available items"); cout<<endl; cprintf("5 . Customer Slip"); cout<<endl; cprintf("6 . Today's sale "); cout<<endl; cprintf("7 . Exit"); cout<<"nnEnter your choice => "; cin>>ch; switch(ch) { case 1: add_shop(); break; case 2: rem_shop(); break; case 3: mod_shop(); break;
  • 13. case 4: show_shop(); break; case 5: cus_slip(); break; case 6: { clrscr(); cout<<"nToday's total sale => "<<today_sale; cout<<"nnnDo you want to go to main menu (y/n) => "; cin>>g; if(g=='y') main_menu(); } break; case 7: exit(0); break; default: cout<<"nInvalid Choice !!n"; cout<<"nChoose againn"; } //Switch case closed } //End of main function
  • 14. void add_shop() // Function to adding items to Shop { clrscr(); textattr(15); cout<<"ntt*********************"; textbackground(15); textattr(9); cprintf(" t AFWWA t "); cout<<"************************ntt ( Air Force Wives Welfare Association )"; fstream f1; shop s1; char c='y'; f1.open("affwa.txt",ios::app|ios::binary); while(c== 'y') { cout<<"nnEnter the detail of the Item => "; s1.getdata(); f1.write( (char*)&s1,sizeof(s1)); cout<<"nDo you want to enter more details (y/n) => "; cin>>c; } f1.close(); cout<<"nDo you want to go main menu (y/n) => "; cin>>g;
  • 15. if(g=='y') { clrscr(); main_menu(); } else { exit(0); } } // End of add_shop() function void show_shop() // Function to show all available items { clrscr(); fstream f1; shop s1; cout<<"nt**** Item list ****n"; f1.open("affwa.txt",ios::in|ios::binary); f1.seekg(0,ios::beg); while(!f1.eof()) { f1.read((char*)&s1,sizeof(s1)); cout<<"n"; s1.putdata(); } f1.close(); cout<<"nDo you want to go to main menu (y/n) => ";
  • 16. cin>>g; if(g=='y') main_menu(); else exit(0); } // End of show_shop() function void mod_shop() // Function for modifying details of items { clrscr(); int k; fstream f1; shop s1; cout<<"nEnter the item code whoose data is to be modified => "; cin>>k; f1.open("affwa.txt",ios::in|ios::binary); f1.seekg(0,ios::beg); int pos; while(!f1.eof()) { pos=f1.tellg(); f1.read((char*)&s1,sizeof(s1)); if ( k==s1.getcode() ) { cout<<"nEnter new details => n";
  • 17. s1.getdata(); f1.seekp(pos); f1.write((char*)&s1,sizeof(s1)); break; } } f1.close(); main_menu(); } void rem_shop() // Function for removing the details of a item { clrscr(); fstream m1,m2; shop s1; m1.open("affwa.txt",ios::in|ios::out|ios::binary); m2.open("a_temp.txt",ios::out|ios::binary); m1.seekg(0,ios::beg); int k; cout<<"nnEnter the item code whose record you want to delete => "; cin>>k; while(!m1.eof()) { m1.read((char*)&s1,sizeof(s1)); if ( k==s1.getcode() ) { }
  • 18. else { m2.write((char*)&s1,sizeof(s1)); } } m1.close(); m2.close(); remove("affwa.txt"); rename("a_temp.txt","affwa.txt"); cout<<"nThe item has been removed !!n "; cout<<"nDo you want to go to main menu (y/n) => "; cin>>g; if(g=='y') { clrscr(); main_menu(); } else { exit(0); } } void cus_slip() // Function for displaying customers’ bill { clrscr(); cout<<"ntt*************** Customer Slip **************nnn"; fstream f1; shop s; int qty; float cost , tot_cost=0;
  • 19. int tno; f1.open("affwa.txt",ios::in|ios::binary); f1.seekp(0,ios::beg); char ch='y'; while(ch=='y') // while 1 { while( !f1.eof()) // while 2 { f1.read((char*)&s,sizeof(s)); cout<<"nEnter the item no .=> "; cin>>tno; if( (s.getcode())==tno ) // if 1 { cout<<"nEnter quantity => "; cin>>qty; cost=qty*(s.getp()); tot_cost+=cost; today_sale+=tot_cost; cout<<"nCost => "<<cost; } // if 1 cout<<"nDo you want to enter more items to your cart (y/n) => "; cin>>ch; if(ch=='y') { continue; } else { break; }
  • 20. } // while 2 } // while 1 f1.close(); cout<<"nnnTotal Amount to be paid by the Customer => "<<tot_cost;; cout<<"nnDo you want to go to main menu (y/n) => "; cin>>g; if(g=='y') { main_menu(); } } Output gallery 1. Main Screen
  • 21. 2. Adding Items to the shop
  • 22. 3. All items Display 4. Customer Slip
  • 23. BIBLOGRAPHY Computer Science with C++ for Class XII by Sumita Arora. Computer Science Support Material, 2013-14 by Kendriya Vidyalaya Sangathan. Together with Computer Science Textbook.