Professional Documents
Culture Documents
/**********************************************************
// PROJECT COURIER SERVICE
//**********************************************************
//**********************************************************
// INCLUDED HEADER FILES
//**********************************************************
#include <iostream.h>
#include <fstream.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
#include <graphics.h>
class station
{
public:
void addition(void);
void modification(void);
void deletion(void);
void list(void);
void search(void);
float amount(char [], float, char);
int foundcode(char []);
private:
char stcode[10], name[20];
float doc, docadd, ndoc, ndocadd;
};
class Date
{
public:
int valid(void);
int custcode;
char name[20], address[30], phone[10], stcode[10], cname[20], caddress[30],
cphone[10], type;
float weight, amount;
Date DoB;
};
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~";
}
else
row++;
}
}
if (!found)
{
gotoxy(5,10);
cout<<"Records not found";
}
gotoxy(1,25);
cout<<"Press any key to continue...";
getche();
f.close();
}
// FUNCTION TO DISPLAY MONTHLY LIST OF THE BOOKING STATUS
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~";
}
else
row++;
}
}
if (!found)
{
gotoxy(5,10);
cout<<"Records not found";
}
gotoxy(1,25);
cout<<"Press any key to continue...";
getche();
f.close();
}
// FUNCTION TO RETURN WHETHER STATION CODE FOUND IN STATION FILE
OR NOT
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~";
}
else
row++;
}
if (!found)
{
gotoxy(5,10);
cout<<"Records not found";
}
gotoxy(1,25);
cout<<"Press any key to continue...";
getche();
f.close();
}
// MAIN FUNCTION
void main()
{
station s;
customer c;
char ch, ch1;
do
{
clrscr();
gotoxy(30,6);
cout<<"DHL COURIER SERVICE";
gotoxy(30,7);
cout<<"^^^^^^^^^^^^^^^^^^^";
gotoxy(30,10);
cout<<"1. STATION INFORMATION";
gotoxy(30,11);
cout<<"2. BOOKING";
gotoxy(30,12);
cout<<"3. SEARCH STATION";
gotoxy(30,13);
cout<<"4. CUSTOMER RECORD";
gotoxy(30,14);
cout<<"5. REPORTS";
gotoxy(30,15);
cout<<"6. EDIT STATION";
gotoxy(30,16);
cout<<"0. QUIT";
gotoxy(30,18);
cout<<"Enter your choice : ";
ch = getch();
switch(ch)
{
case '1':
s.list();
break;
case '2':
c.booking();
break;
case '3':
s.search();
break;
case '4':
c.search();
break;
case '5':
do
{
clrscr();
gotoxy(34,8);
cout<<"REPORTS MENU";
gotoxy(34,9);
cout<<"^^^^^^^^^^^^";
gotoxy(28,12);
cout<<"1. DAILY BOOKING STATUS";
gotoxy(28,13);
cout<<"2. MONTHLY BOOKING STATUS";
gotoxy(28,14);
cout<<"0. EXIT";
gotoxy(28,16);
cout<<"Enter your choice : ";
ch1 = getch();
switch(ch1)
{
case '1':
c.dailylist();
break;
case '2':
c.monthlylist();
break;
}
} while (ch1 != '0' && ch1 != 27);
break;
case '6':
do
{
clrscr();
gotoxy(31,8);
cout<<"EDIT STATION MENU";
gotoxy(31,9);
cout<<"^^^^^^^^^^^^^^^^^";
gotoxy(28,12);
cout<<"1. ADD NEW STATION RECORD";
gotoxy(28,13);
cout<<"2. DELETE STATION RECORD";
gotoxy(28,14);
cout<<"3. MODIFY STATION RECORD";
gotoxy(28,15);
cout<<"0. EXIT";
gotoxy(28,17);
cout<<"Enter your choice : ";
ch1 = getch();
switch(ch1)
{
case '1':
s.addition();
break;
case '2':
s.deletion();
break;
case '3':
s.modification();
break;
}
} while (ch1 != '0' && ch1 != 27);
break;
}
} while (ch != '0' && ch != 27);
}
OUTPUTS:
STATION INFORMATION:
BOOKINGS:
EDIT STATION:
ADD NEW RECORD:
CUSTOMER RECORD:
STATION TABLE:
CUSTOMER TABLE: