Vous êtes sur la page 1sur 24

TERM PAPER OF OOPS ON Gas Management System

Submitted To: Submitted By:MISS. AMANDEEP KAUR SETIA MOHIT

Gas Management System

Roll No:RD3804B50 Regd.No.:-10806865

Acknowledgement
I have the honor to express our gratitude to our teacher MS.AMANDEEP KAUR for their timely help, support encouragement, valuable comments, suggestions and many innovative ideas in carrying out this project. It is great for me to gain out of their experience. I also owe overwhelming debt to my parents for their constant encouragement and support throughout the execution of this project. Above all, consider it a blessing of the Almighty God that i have been able to complete this project. His contribution towards every aspect of ours throughout our life would always be the supreme and unmatched.

Signature Mohit setia

Gas Management System

Table of contents

Aim of project3 Existing System.4 Proposed System.5 Introduction of Gas Management System.6 System requirements ..7 Source code 8

Gas Management System

Testing output 19 Future scope 22 Bibliography .23

AIM OF PROJECT
Main aim of project is to provide an easy and useful system. Which is capable of with less time than the manual system? The aim of the project can be described as following:1. Time saving. 2. Resource saving. 3. Easy of use. 4. Addition of address. 5. Deleting of address. 6. Modification, view and editing of customers details.

Gas Management System

EXISTING SYSTEM
Before the advent of computers, every task was being accomplished manually. But with the passage of time some tasks go on becoming more difficult and even at some stage became impossible to do. The present or existing system of GAS MANAGAEMENT has a lot of shortcomings, as follows:-

Time consuming as all the tasks are being performed manually, so it takes a lot of time. It involves the presence of all the recorded data whenever required, but in some cases it would not be possible. Time to time details checking of the customer when required

Gas Management System

Each and every task cant be performed by a single person Here the maintenance task is very difficult. Thus these are some drawbacks of the existing technology. So the proposed system is designed to overcome the problems.

PROPOSED SYSTEM
The proposed system has the following benefits: This system will facilitate the searching criteria for all

customers . Anyone can refer to the software easily. The system is economical in terms of maintenance. No need to handle the task manually. This system will save lot of time because we dont need any manual effort.
6

Gas Management System

It provides the user-friendly environment so as to access the software. It makes the booking done to user in quick instance. It is also more flexible than the existing system. It widens the interaction site. No documentation is required, as everything is being represented by the software itself.

Introduction:
This program is based on the system which is used in most of the Gas Station. With the help of the Gas Booking system program the agencies work and functions of the Gas Agencies become very easy. By using it ,they can easily find the account of the particular person which has been entered.They can also modify or make changes to the customers details. They do a simple tasks: First of all a menu is displayed on the screen,which allows the user to check on the function/task he wants to perform.
7

Gas Management System

The detail of the particular function is displayed and the required output is given by the user so that the particular function can be performed.

System Requirements:
1. Hardware:
A. Hard disk 10 GB

B. Ram 256mb
C. Cache memory 667kb

2. Software:
8

Gas Management System

TurboC++; Turboc30.

/*Gas Management System*/ (Source Code)


# include <iostream.h> # include <conio.h> # include <string.h> # include <stdlib.h> int dmenu(); //main menu void dadd(); //add to list void dfind(); //search from the list
9

Gas Management System

void dedit(); //edit the record void ddel(); //delete from the list void ddisp(); //display all void ddisp1(); void ddisp2(); void dwith(); void ddepo(); void dcurrent_with(); void dcurrent_depo(); void booking(); void withdrawal(); class dnode { int num,bal,check; char dlname[20], dfname[20], dtel[15]; class dnode *dnext; }; typedef struct dnode node; node *dstart, *dtemp; int i=5000,chk=1,j=15000; int dmenu() { int dch; gotoxy(30,5); cout<<" GAS MANAGEMENT DATABASE "; gotoxy(30,6); cout<<" =========================="; gotoxy(27,10); cout<<" 1. Create a new Connection"; gotoxy(27,11); cout<<" 2. Search customer details"; gotoxy(27,12); cout<<" 3. Edit customer details"; gotoxy(27,13); cout<<" 4. Delete a customer"; gotoxy(27,14); cout<<" 5. Display all customers "; gotoxy(27,15); cout<<" 6. Booking"; gotoxy(27,16); cout<<" 7. Exit ";
10

Gas Management System

gotoxy(27,17); cout<<" Enter your choice(1-7):"; gotoxy(55,17); cin>>dch; return dch; } void dadd() { int type; node *dptr,*dprev; dtemp=(node *)malloc(sizeof(node)); cout<<"\nWhich type of connection you want?\n1->single cylinder\n2->double cylinder\nenter your choice : "; cin>>type; if(type==1) { do{ cout<<("\nYour Account No:"); dtemp->num=i; cout<<("%d",dtemp->num); i++; }while(i>10000); cout<<"\nFirst name: "; cin>>dtemp->dfname; cout<<"Last name:"; cin>>dtemp->dlname; cout<<Telephone No.: "; cin>> dtemp->dtel; dtemp->dnext=NULL; if(dstart==NULL) dstart=dtemp; else { dprev=dptr=dstart; while(strcmp(dtemp->dfname,dptr>dfname)>0){ dprev=dptr; dptr= dptr->dnext; if (dptr == NULL) break; } if(dptr==dprev) { dtemp->dnext=dstart;
11

Gas Management System

dstart=dtemp; } else if(dptr==NULL) dprev->dnext=dtemp; else { dtemp->dnext=dptr; dprev->dnext=dtemp; } } ddisp1(); } else if(type==2) { do{ cout<<"\nYour Account No:"; dtemp->num=j; cout<<dtemp->num; j++; } while(j>20000); cout<<"\nFirst name: "; cin>> dtemp->dfname; cout<<"Last name:"; cin>>dtemp->dlname; cout<<"Telephone No.: "; cin>>dtemp->dtel; dtemp->dnext=NULL; if(dstart==NULL) dstart=dtemp; else { dprev=dptr=dstart; while(strcmp(dtemp->dfname,dptr->dfname)>0){ dprev=dptr; dptr= dptr->dnext; if (dptr == NULL) break; } if(dptr==dprev) { dtemp->dnext=dstart; dstart=dtemp; } else if(dptr==NULL)
12

Gas Management System

dprev->dnext=dtemp; else { dtemp->dnext=dptr; dprev->dnext=dtemp; } } ddisp2(); } } void dfind() //searching function. { node *dptr; int no,num; if(dstart==NULL) { cout<<"\n\t\t\tNO ACCOUNT DATABASE....\n"; getch(); return; } cout<<"Enter the account No : "; cin>>&no; dptr=dstart; while(dptr->num!=no) { dptr= dptr->dnext; if (dptr == NULL) break; } if(dptr!=NULL) { if(dptr->num>=5000 && dptr->num<10000) { cout<<"\t\t------------------------------\n"; if(dptr->num==no) { cout<<"\n\t\tHELLO WELCOME TO gas agency", dptr>dlname; cout<<"\n\t\tYou are a single cinnection holder"; cout<<"\n\t\tAccount number:",dptr->num; cout<<"\n\t\tFirst name: %s", dptr->dfname; cout<<"\n\t\tLast name:%s", dptr->dlname; cout<<"\n\t\tTelephone No.: %s", dptr->dtel;
13

Gas Management System

cout<<"\n\t\t------------------------------\n"; } } else{ cout<<"\n\n"; cout<<"\t\t------------------------------\n"; if(dptr->num==no) { cout<<"\n\t\tHELLO %s WELCOME ", dptr->dlname; cout<<"\n\t\tAccount number:",dptr->num; cout<<"\n\t\tFirst name: ", dptr->dfname; cout<<"\n\t\tLast name:", dptr->dlname; cout<<"\n\t\tTelephone No.: ", dptr->dtel; cout<<"\n\t\t------------------------------\n"; } } } else { cout<<"No Matching Records Found .......\n"; } getch(); } void booking() //booking function { int no; node *dptr,*dprev; if(dstart==NULL) { cout<<"\n\t\t\tNO ACCOUNT DATABASE....\n"; getch(); return; } cout<<"Enter your account no : "; cin>>no; dptr=dstart; while(dptr->num!=no){ dptr= dptr->dnext; if (dptr == NULL) break; }
14

Gas Management System

if(dptr!=NULL){ if(dptr->num>=5000 && dptr->num<10000) { ddepo(); } else { dcurrent_depo(); } } else { cout<<"\nNo Matching Records Found ......."; } getch(); } void ddepo() { int ch; node *dptr; cout<<"\t\t\n-----------------------------------------------\n"; cout<<"\n\t\tHELLO WELCOME ", dptr->dlname; cout<<"\nAccount No: \n",dptr->num; cout<<"First Name : \n",dptr->dfname; cout<<"Last Name : \n",dptr->dlname; cout<<"Phone Number : %s\n",dptr->dtel; cout<<"Booking done:"; getch(); } void dcurrent_depo() { node *dptr; int bal,ch; cout<<"\t\t\n-----------------------------------------------\n"; cout<<"\n\t\tHELLO WELCOME ", dptr->dlname; cout<<"\nAccount No: \n",dptr->num; cout<<"First Name : \n",dptr->dfname; cout<<"Last Name : \n",dptr->dlname; cout<<"Phone Number : \n",dptr->dtel; cout<<"\nwant to book cylinder\n1->yes\n2->no\n Enter your choice : ";
15

Gas Management System

cin>>ch; if(ch==1) { cout<<"Booking done:"; } else if(ch==2) { cout<<"Booking not done\n"; } getch(); } void dedit() { node *dptr; int no,bal; if(dstart==NULL) { cout<<"\n\t\t\tNO ACCOUNT DATABASE....\n"; getch(); return; } cout<<"Enter number to Edit : "; cin>>no; dptr=dstart; while(dptr->num!=no){ dptr= dptr->dnext; if (dptr == NULL) break; } if(dptr!=NULL) { cout<<"\t\t\n---------------------------------------\n"; cout<<"\n\t\tHELLO WELCOME ", dptr->dlname; cout<<"\nOld First Name : %s", dptr->dfname; cout<<"\nNew First Name : "; cin>> dptr->dfname; cout<<"\nOld Last Name : ", dptr->dlname; cout<<"\nNew Last Name : "; cin>> dptr->dlname; cout<<"\nPhone Number :", dptr->dtel; cout<<"\nNew Phone Number : "; cin>>", dptr->dtel; }
16

Gas Management System

else { cout<<"No Matching Records Found .......\n"; } getch(); } void ddel() //delete function { node *dptr,*dprev,*dtemp; int no; char dyn='n'; if(dstart==NULL) { cout<<("\n\t\t\tNO ACCOUNT DATABASE....\n"); getch(); return; } cout<<"Enter your account no to delete : "; cin>>no; dprev=dptr=dstart; while(dptr->num!=no){ dprev=dptr; dptr= dptr->dnext; if (dptr == NULL) break; } if(dptr!=NULL){ cout<<"\nDeleting Record.....Confirm [y/n]: "; dyn=getch(); cout<<"\n\n------------------------------------"; cout<<"\n\t\tHELLO WELCOME ", dptr->dlname; cout<<"\nAccount No : \n",dptr->num; cout<<"First Name : \n",dptr->dfname; cout<<"Last Name : \n",dptr->dlname; cout<<"Phone Number : \n",dptr->dtel; cout<<"-------------------------------------------"; if(dyn=='y') { if (dptr==dstart) { dtemp=dstart->dnext; free(dstart); dstart=dtemp; } else {
17

Gas Management System

dtemp=dptr->dnext; free(dptr); dprev->dnext=dtemp; } cout<<("\n\n1 Record Deleted...."); } else cout<<("\n\nRecord not Deleted...."); } else { cout<<("\nNo Matching Records Found ......."); } getch(); } void ddisp() //display all function { node *dptr; if(dstart==NULL) { cout<<"\n\t\t\tNO ACCOUNT DATABASE....\n"; getch(); return; } clrscr(); cout<<"\t\t------------------------------\n"; for(dptr=dstart; dptr!=NULL; dptr=dptr->dnext) { cout<<"\n\t\tHELLO %s WELCOME ", dptr->dlname; cout<<"\n\t\tAccount number: %d",dptr->num; cout<<"\n\t\tFirst name: %s", dptr->dfname; cout<<"\n\t\tLast name:", dptr->dlname; cout<<"\n\t\tTelephone No.: ", dptr->dtel; cout<<"\n\t\t------------------------------\n"; } getch(); } void ddisp1() //display function for single connection { cout<<"\n\n"; cout<<"\t\t------------------------------\n"; cout<<"\n\t\tHELLO WELCOME ", dtemp->dlname;
18

Gas Management System

cout<<"\n\t\tYou are a single connection holder"; cout<<"\n\t\tAccount number: ",dtemp->num; cout<<"\n\t\tFirst name: ", dtemp->dfname; cout<<"\n\t\tLast name:", dtemp->dlname; cout<<"\n\t\tTelephone No.: ", dtemp->dtel; cout<<"\n\t\t------------------------------\n"; getch(); } void ddisp2() //display function for double line { cout<<"\n\n");cout<<"\t\t------------------------------\n"; cout<<"\n\t\tHELLO WELCOME", dtemp->dlname; cout<<"\n\t\tYou are a double connection holder"; cout<<"\n\t\tAccount number: ",dtemp->num; cout<<"\n\t\tFirst name: ", dtemp->dfname; cout<<"\n\t\tLast name:", dtemp->dlname; cout<<"\n\t\tTelephone No.: ", dtemp->dtel; cout<<"\n\t\t------------------------------\n"; getch(); } void main() { int dch; dstart=(node *)malloc(sizeof(node)); dstart=NULL; do{ clrscr(); dch=dmenu(); clrscr(); switch(dch) { case 1: dadd(); break; case 2: dfind(); break; case 3: dedit(); break; case 4:ddel();
19

Gas Management System

break; case 5:ddisp(); break; case 6:booking(); break; } }while(dch!=7); }

Testing Output
1 .Main Menu Display:

2. Creating account:

20

Gas Management System

3. To search customer Details:

4. Edit the customer Details:

21

Gas Management System

5. Display All Customers:

5. Delete a Record:

6. Booking:

22

Gas Management System

Future Scope
The Gas Booking system program is now a days is very useful ,in the booking of gas. It helps the Gas agencies in its daily common functions, like changing the customer records, booking, adding a new customer etc. It makes the most tuff tasks of the booking and maintaining the records. It is such a simple way to check the record of the account, delete etc and use so it is as we need. It is expected that It will be used very commonly in future. Here are the reasons that makes it to be used it in future. 1. It is easy to use. 2. It takes less time to perform its task. 3. Its results are very reliable. 4. Reduces data duplicacy .

Bibliography:
23

Gas Management System The following were the sources of this project: Books 1. ANSI C by E.Balagurusamy 2. Let us C by Yashwant Kanitkar Internet 1. SourceCodes.com 2. Pscodes.com

24