A Project Report ON: Medical Store Billing System
A Project Report ON: Medical Store Billing System
ON
BCA
Of
The need of this system arises from error prone results and
need to save the time.
Acknowledgement
First and foremost, I thank Almighty (God) for all His blessings
showered on me.
We wish & express our heart full gratitude to the project guide Mr
Pushpendra Tiwari for the guidance and suggestions throughout the project,
without which I would not have been able to complete this project
successfully.
Name Signature
Pushpendra Tiwari
CONTENTS
TOPIC
1. About Project
2. About C++
4. File Structure
5. Source Code
6. Input Form
7. Output Form
8. Bibliography
About Project:
The software developed by us can used in any small scale
Medical Store in order to remove the burden of manual
working process which were used in small directory for daily
working process for the creation of new user , modification
and deletion which is time consuming and error prone. So
for the removal of all the burdens from the Medical Store
their employee wants a computerized system for the entry
process in the Medical Store.
About C++
General Information
It’s important not to forget that Data flow diagrams are not a
model of flow of control or sequence of processing in a
system. Data flow diagrams must be seen as a model, which
show the flow of data through a system.
DATA FLOW DAIGRAM FOR THE PROJECT
ENTRY
OPERATOR PROCESS OF
DATA MED_REC.DAT
SEARCH BY
OPERATOR BATCH OUTPUT
NUMBER
MED_REC.DAT
3) DFD FOR DELETING ACCOUNT OF MEMBER
OPERATOR DELETE
RECORD BY MED_REC.DAT
SEARCH
BATCH
NUMBER
MED_REC.DAT TEMP.DAT
FLOW CHART
Apart from, the DFDS the flow charts has been helping the
programmer to develop the programming logic and to serve
as the documentation for a Completed program, it has the
following advantages
7. It facilitates troubleshooting.
3. Reproduction is difficult.
START
YES
Is Choice=1 Add New Data To
File
NO
YES
Is Choice=2 Display All Record
Yes
YES
Search Record
Is Choice=3
NO
YES
Delete Record
Is Choice=4
NO
Is Choice=5
NO
YES
STOP
B
A
if choice=6
Sale price
Main menu
Modify record
if choice=0
if choice=1
Batch number
if choice=2
Medicine name
if choice=3
company name
if choice=4
Manufact. date
if choice=5
Expiry date
A
if
c
h
oi
ce
4
B
A
if choice=6
Sale price
Main menu
File Structure
INITIAL.DAT TABLE
Source Code
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
#include<dos.h>
struct date d;
class Medical
{
private:
char batch_no[10];
char med_name[25],company[25];
char manu_date[10],expiry_date[10];
float price_10,price;
int item;
int dd,mm,yyyy;
public:
void input_data();
void output_data();
void modify_menu();
char* return_batch_no()
{
return(batch_no);
}
};
textcolor(10);
gotoxy(33,4);
cprintf("INPUTING OF RECORD");
gotoxy(28,6);
cprintf("==========================");
textcolor(15);
cprintf("");
gotoxy(18,8);
cout<<"Enter the Batch Number of Medicine: ";
fflush(stdin);
gets(batch_no);
gotoxy(18,10);
cout<<"Enter the Name of the Medicine: ";
gets(med_name);
gotoxy(18,12);
cout<<"Enter the Manufacturer Company Name: ";
gets(company);
gotoxy(18,14);
cout<<"Enter Manufacturing Date (Mm-Yyyy): ";
gets(manu_date);
gotoxy(18,16);
cout<<"Enter the Expiry Date (Mm-Yyyy): ";
gets(expiry_date);
gotoxy(18,18);
cout<<"Enter the Saling Price (Per 10 item): ";
cin>>price_10;
gotoxy(18,20);
cout<<"Enter the how many Medicine Sale: ";
cin>>item;
}
void Medical::modify_menu()
{
int ch=0,f=0;
while(1)
{
clrscr();
textcolor(10);
gotoxy(33,10);
cprintf("MODIFY MENU");
gotoxy(26,12);
cprintf("==================== ");
textcolor(9);
gotoxy(31,14);
cprintf("1. Batch Number");
gotoxy(31,16);
cprintf("2. Medicine Name");
gotoxy(31,18);
cprintf("3. Company Name");
gotoxy(31,20);
cprintf("4. Manufact. Date");
gotoxy(31,22);
cprintf("5. Expiry Date");
gotoxy(31,24);
cprintf("6. Sale Price");
gotoxy(31,26);
cprintf("7. Saled Quantity.");
gotoxy(31,28);
cprintf("0. Exit");
gotoxy(31,31);
textcolor(10);
cprintf("Enter your choice: ");
textcolor(15);
cin>>ch;
switch(ch)
{
case 1: clrscr();
gotoxy(18,23);
cout<<"Enter the New Batch Number of Medicine:";
fflush(stdin);
gets(batch_no);
gotoxy(18,26);
cout<<"Medicine Code has Modified successfuly.";
break;
case 2: clrscr();
gotoxy(18,23);
cout<<"Enter the New Name to Medicine: ";
fflush(stdin);
gets(med_name);
gotoxy(18,26);
cout<<"Name has been Modified successfully.";
break;
case 3: clrscr();
gotoxy(18,23);
cout<<"Enter the New Name for Manufacturer Company: ";
fflush(stdin);
gets(company);
gotoxy(18,26);
cout<<"Manufacturer Company Name has Nodified successfully.";
break;
case 4: clrscr();
gotoxy(18,23);
cout<<"Enter the New Manufacturing Date (Mm-Yyyy): ";
fflush(stdin);
gets(manu_date);
gotoxy(18,26);
cout<<"Manufacturing Date has Modified successfully.";
break;
case 5: clrscr();
gotoxy(18,23);
cout<<"Enter the New Expiry Date (Mm-Yyyy): ";
fflush(stdin);
gets(expiry_date);
gotoxy(18,26);
cout<<"Expiry Date has Modified successfully.";
break;
case 6: clrscr();
gotoxy(18,23);
cout<<"Enter the Sale Price (Per 10 piece): ";
cin>>price_10;
gotoxy(18,26);
cout<<"Saling Price has Modified successfully.";
break;
case 7: clrscr();
gotoxy(18,23);
cout<<"Enter the Quantity how many Sale: ";
cin>>item;
gotoxy(18,26);
cout<<"Medicine Quantity has Modified successfully.";
break;
case 0: clrscr();
f=1;
break;
}//switch
if(f==1)
break;
getch();
}//while
}//end
//...................................Main Module…………………………..............//
void main()
{
Medical medical;
int flag=0,choice,nbyte=sizeof(medical);
char b_no[10];
fstream murli, abhinesh; // read/write both
murli.open("med_rec.dat",ios::in|ios::out|ios::binary);
getdate(&d);
clrscr();
textcolor(10);
gotoxy(22,5);
cprintf("WELCOME TO MEDICAL STORE BILLING SYSTEM");
gotoxy(17,7);
textcolor(9);
cprintf("*************************************************");textcolor(
15);
gotoxy(25,9);
cprintf("DATE: %d/%d/%d",d.da_day,d.da_mon,d.da_year);
textcolor(10);
gotoxy(22,26);
cprintf("SUBMITTED BY: ");
gotoxy(22,27);
cprintf("──────────────────────");
textcolor(15);
gotoxy(25,29);
cprintf("MURLEEDHAR PATEL");
gotoxy(25,31);
cprintf("ABHINESH GUPTA");
gotoxy(25,33);
cprintf("BCA PART III");
gotoxy(25,35);
cprintf("SESSION: 2011-12");
gotoxy(25,37);
cprintf("S. N. COLLEGE BILASPUR CG.");
gotoxy(17,40);
textcolor(9);
cprintf("*************************************************");
textcolor(15);
gotoxy(31,45);
cout<<"Press any key to continue....";
getch();
while(1)
{
clrscr();
textcolor(10);
gotoxy(30,10);
cprintf("M A I N M E N U ");
gotoxy(26,12);
cprintf("════════════════════");
textcolor(9);
gotoxy(31,14);
cprintf("1. Add New");
gotoxy(31,16);
cprintf("2. Search Record");
gotoxy(31,18);
cprintf("3. Display ALL");
gotoxy(31,20);
cprintf("4. Modify Record");
gotoxy(31,22);
cprintf("5. Delete Record");
gotoxy(31,24);
cprintf("0. Exit");
textcolor(10);
gotoxy(31,28);
cprintf("Enter your choice: ");
cin>>choice;
textcolor(15);
switch(choice)
{
case 1:clrscr();
medical.input_data();
murli.clear();
murli.seekp(0,ios::end);
murli.write((char *)&medical, sizeof(medical));
break;
case 2: clrscr();
flag=0;
gotoxy(20,23);
cout<<"Enter the Batch Number to Search: ";
fflush(stdin);
gets(b_no);
murli.clear();
murli.seekg(0, ios::beg);
while(murli.read((char *)&medical,sizeof(medical)))
{
if(strcmpi(medical.return_batch_no(),b_no)==0)
{
medical.output_data();
gotoxy(31,45);
cout<<"Press any key to continue....";
getch();
flag=1;
}
murli.clear();
}
if(flag==0)
{
gotoxy(30,25);
cout<<"Record doesn't Exist.";
getch();
}
break;
case 3: clrscr();
flag=0;
murli.clear();
murli.seekg(0,ios::beg);
while(murli.read((char *)&medical,sizeof(medical)))
{
medical.output_data();
gotoxy(31,45);
cout<<"Press any key to continue....";
getch();
flag=1;
murli.clear();
}
if(flag==0)
{
gotoxy(30,24);
cout<<"Record doesn't Exist.";
getch();
}
break;
case 4: clrscr();
flag=0;
gotoxy(18,23);
cout<<"Enter the Batch Number to modify their Record: ";
fflush(stdin);
gets(b_no);
murli.clear();
murli.seekg(0, ios::beg);
while(murli.read((char *)&medical,sizeof(medical)))
{
if(strcmpi(medical.return_batch_no(),b_no)==0)
{
medical.modify_menu();
murli.seekg(-nbyte,ios::cur);
murli.write((char*)&medical,sizeof(medical));
flag=1;
break;
}
}
if(flag==0)
{
gotoxy(30,26);
cout<<"Record doesn't Exist.";
getch();
}
break;
case 5: clrscr();
flag=0;
gotoxy(18,23);
cout<<"Enter the Batch Number to Delete their Record:";
fflush(stdin);
gets(b_no);
murli.clear();
murli.seekg(0,ios::beg);
abhinesh.open("temp.dat",ios::out|ios::binary);
while(murli.read((char*)&medical,sizeof(medical)))
{
if(strcmpi(medical.return_batch_no(),b_no)!=0)
abhinesh.write((char *)& medical,sizeof(medical));
else
flag=1;
}
if(flag==1)
{
gotoxy(30,26);
cout<<"Record has been Deleted.";
murli.close();
abhinesh.close();
remove("med_rec.dat");
rename("temp.dat","med_rec.dat");
murli.open("med_rec.dat",ios::in|ios::out|ios::binary);
}
else
{
abhinesh.close();
remove("temp.dat");
gotoxy(30,26);
cout<<"Record doesn't Exist.";
}
getch();
break;
case 0: clrscr();
murli.close();
exit(1);
default:
clrscr();
gotoxy(30,22);
cprintf("Wrong choice,");
gotoxy(30,24);
cprintf("Enter the choice properly.");
getch();
}
}
}
Input Form
Output Form
BIBLIOGRAPHY
The following books and manuals provided a lot of help to us in making this project a
reality.
C++ COMPLETE REFERENCE
HERBERT SCHILDT
HOW TO PROGRAM C++
DEITERL & DEITEL
C++ PROGRAMMING
O’RELLY
SOFTWARE ENGINEERING
R. E. FAIRELY
SOFTWARE ENGINEERING
PRESSMAN
AN INTEGRATED APPROACH TO SOFTWARE
ENGINNERING
PANKAJ JALOTE
NAROSA PUBLISING HOUSE
SYSTEM ANALYSIS AND DESIGN
ELIAS M AWAD
GALGOTIA
C++ Programming
Yaswant Kanetkar