Travelig Agengy: Presented By: Bashar Ali, Aws Ismail, & Kamal Saleh 2Nd Stage (Evening Study) Dr. Omar Youssef
Travelig Agengy: Presented By: Bashar Ali, Aws Ismail, & Kamal Saleh 2Nd Stage (Evening Study) Dr. Omar Youssef
Travelig Agengy: Presented By: Bashar Ali, Aws Ismail, & Kamal Saleh 2Nd Stage (Evening Study) Dr. Omar Youssef
PRESENTED BY:
INTRODUCTION……………………………………………………2
ABSTRACT…………………………………………………………. 2
SCOPE …………………………………………………………. 3
OUTPUT…………………….………………….6-8
HEADER ……………………………………………….8-10
CODE………………………………………………………12-18
2|P a g e
TRAVELING AGENGY
ABSTRACT:
Introduction:
The record of customer can be stored in the single file. This software can
be used in several traveling agencies for keeping the records of the
customer and also used to add record of school trip, government officer
Holiday, family trip and large industries traveling record.
The software used for arranging travel services, provide new and
improved services, and identify travel related cost savings.
3|P a g e
SCOPE OF PROJECT:
Display:
In Display option, read the all client information such as client no,
client name, address, phone no and cost.
Search:
Modify:
Delete:
4|P a g e
software requirement specification
1. Functionality:
2. Performance:
3.Design constraints:
There are number of factors in the client environment that may restrict the
choices of designer.
4.External interface :
All possible interactions of the software with client, hardware & other
software should be clearly specified.
5|P a g e
Hardware requirements:
Software requirements:
C++
Windows os
SYSTEM DESIGN:
Following calculations are carried out to calculate the total cost of travels:
Output:
1)REGISTRATION.
2)DISPLAY
7|P a g e
3)SERACH
4)MODIFY
8|P a g e
5)DELETE
There are the following library functions which are used in this program.
The uses of these functions are also given below:
1.#include<iostream.h>
This header file contains all the standard input and output functions.
cin>>=It is used for scan the data. This is same as scanf function .
9|P a g e
2.#include<conio.h>
e.g.
clrscr():-It clears the current text window and place the cursor in the
upper left hand corner.
3.#include<process .h>
4.#include<string .h>
This header file contains function prototypes for c-style string processing
functions.
10 | P a g e
Constant, data type and global variable are used for some
comparisons of character, check length for character.
5.#include<ctype.h>
This header file contains function prototypes for functions that test
characters for
certain properties, and function prototypes for functions that can be used
to convert lowercase letters to uppercase letters and vice versa.
6.#include<dos.h>
Data d;
7.#include<fstream.h>
This header file contains function prototypes for functions that perform
input from files on disk and output to files on disk.
8.#include<stdio.h>
This header file contains function prototypes for the standarad input/output
library functions and information used by them.
9.#include<graphics.h>
11 | P a g e
FUTURE ENHANCEMENT
1-Modify this system to perform additional operations such as modification the Registrat
of travels etc.
2-This system will be extended in future to handle number of places and also provide
more
Vehicles.
CONCLUSION
In future, this system can launch web site for easy online registration. In
this system there is limitation for places and vehicles. In future, it can be
extended to add more place and vehicles.
12 | P a g e
Code:
16 | P a g e
t_usertripplan = int indexForId = 0; cout << endl; cout <<
'"+userTripPlan+"', bool HaveException cout << "Enter "Failed To Delete!" <<
t_usertripcost = = false, NotInDatabase Item Column ID: "; mysql_errno(conn) <<
'"+userTripCost+"' = false; cin >> itemId; endl;
where t_id = // Variables End cout << endl; }
'"+strid+"'"; }
const char* qu = cout << "Welcome To catch (exception e) }
update_query.c_str(); Travel Agency { else
qstate = Management System" cout << "Please {
mysql_query(conn, qu); << endl << endl; Enter a valid cout << "Item
cout << "Show Users NUMBER." << endl; Not Found in database."
if (!qstate) Menu" << endl << endl; HaveException = << endl;
{ true; }
cout << endl goto ExitMenu; }
<< "Successfully Saved qstate = }
In Database." << endl; mysql_query(conn, // Exit Code
} "select * from if (HaveException == ExitMenu:
else travelagency_tb"); false) cout << "Press 'm' to
{ if (!qstate) { Menu, 'd' to delete
cout << { stringstream another record and any
"Failed To Update!" << res = streamid; other key to Exit: ";
mysql_errno(conn) << mysql_store_result(conn string strid; cin >> choose;
endl; ); streamid << itemId; if (choose == 'm' ||
} streamid >> strid; choose == 'M')
printf("--------------------- {
} ------------------------------ for (int i = 0; i < main();
else ------------------------------ indexForId; i++) }
{ ------------------------------ { else if (choose == 'd' ||
cout << "Item --\n"); if (strid != choose == 'D')
Not Found in database." printf("| %-10s | %- items[i]) {
<< endl; 25s | %-25s | %-40s |\n", { DeleteUser();
} "Column ID", "User NotInDatabase }
} Name", "Trip Date", = true; else
"Trip Plan"); }else {
ExitMenu: while ((row = { exit(0);
cout << "Press 'm' to mysql_fetch_row(res))) NotInDatabase }
Menu, 'e' to edit another { = false; }
item and any other key printf("| %-10s | break;
to Exit: "; %-25s | %-25s | %-40s } void AddTrip()
cin >> choose; |\n", row[0], row[1], } {
if (choose == 'm' || row[5], row[6]); // Initial Load
choose == 'M') if (NotInDatabase system("cls");
{ items[indexForId] = == false) // Initial Load End
main(); row[0]; {
} indexForId++; string // Variables
else if (choose == 'e' || } delete_query = "delete string tripName = "";
choose == 'E') from travelagency_tb char choose;
{ where t_id = // Variables End
printf("---------------------
EditUser(); '"+strid+"'";
------------------------------
} const char* qd = cout << "Welcome To
------------------------------
else delete_query.c_str(); Travel Agency
------------------------------
{ qstate = Management System"
--\n");
exit(0); mysql_query(conn, qd); << endl << endl;
}
} cout << "Add Trip
else
} if (!qstate) Menu" << endl << endl;
{
{
cout << "Query
void DeleteUser() cout << cin.ignore(1, '\n');
Execution Problem!" <<
{ "Successfully Deleted cout << "Enter Trip
mysql_errno(conn) <<
system("cls"); From Database." << Name: ";
endl;
endl; getline(cin,
}
// Variables } tripName);
char choose; else
try
int itemId; { string insert_query =
{
string items[5000]; "insert into
17 | P a g e
travelagencytrips_tb // Exit Code ------------------------------ NotInDatabase
(t_trip) values cout << "Press 'm' to ------\n"); = false;
('"+tripName+"')"; Menu and 'a' to Insert printf("| %-10s | %- break;
Again Or Any Other key 40s |\n", "Trip Id", "Trip }
const char* q = to exit: "; Name"); }
insert_query.c_str(); // cin >> choose; while ((row =
c_str converts string to if (choose == 'm' || mysql_fetch_row(res))) if (NotInDatabase
constant char and this is choose == 'M') { == false)
required { printf("| %-10s | {
main(); %-40s |\n", row[0], string
qstate = } row[1]); findbyid_query = "select
mysql_query(conn, q); else if (choose == 'a' || } * from
choose == 'A') travelagencytrips_tb
if (!qstate) { printf("--------------------- where t_id =
{ AddTrip(); ------------------------------ '"+strid+"'";
cout << endl << } ------\n"); const char* qi =
"Successfully added in else } findbyid_query.c_str();
database." << endl; { else qstate =
} exit(0); { mysql_query(conn, qi);
else } cout << "Query
{ } Execution Problem!" << if (!qstate)
cout << "Query mysql_errno(conn) << {
Execution Problem!" << void EditTrip() endl; cout << endl;
mysql_errno(conn) << { } res =
endl; system("cls"); mysql_store_result(conn
} try );
// Variables {
qstate = string tripName = ""; cout << endl; printf("---------------------
mysql_query(conn, string items[5000]; cout << "Enter ------------------------------
"select * from char choose; Item Column ID: "; ------\n");
travelagencytrips_tb"); int itemId; cin >> itemId; printf("| %-10s
if (!qstate) bool HaveException cout << endl; | %-40s |\n", "Trip Id",
{ = false; } "Trip Name");
res = bool NotInDatabase = catch (exception e) while ((row =
mysql_store_result(conn false; { mysql_fetch_row(res)))
); int indexForId = 0; cout << "Please {
Enter a valid printf("| %-
printf("--------------------- // Store Variables NUMBER." << endl; 10s | %-40s |\n", row[0],
------------------------------ string storeColumnId HaveException = row[1]);
------\n"); = ""; true; }
printf("| %-10s | %- string storeTripName goto ExitMenu;
40s |\n", "Trip Id", "Trip = ""; } printf("---------------------
Name"); // Variables End ------------------------------
while ((row = if (HaveException == ------\n");
mysql_fetch_row(res))) cout << "Welcome To false) }
{ Student Fee Inquiry { else
printf("| %-10s | Program" << endl << stringstream {
%-40s |\n", row[0], endl; streamid; cout <<
row[1]); cout << "Edit Trip string strid; "Query Execution
} Record" << endl; streamid << itemId; Problem!" <<
streamid >> strid; mysql_errno(conn) <<
printf("--------------------- endl;
------------------------------ qstate = for (int i = 0; i < }
------\n"); mysql_query(conn, indexForId; i++)
} "select * from { cin.ignore(1,
else travelagencytrips_tb"); if (strid != '\n');
{ if (!qstate) items[i]) cout << "Enter
cout << "Query { { Trip Name (xN to not
Execution Problem!" << res = NotInDatabase change): ";
mysql_errno(conn) << mysql_store_result(conn = true; getline(cin,
endl; ); }else tripName);
} { if (tripName ==
printf("--------------------- "xN")
18 | P a g e
{ cout << "Enter cout <<
tripName = // Variables Item Column ID: "; "Failed To Delete!" <<
storeTripName; char choose; cin >> itemId; mysql_errno(conn) <<
} int itemId; cout << endl; endl;
string items[5000]; } }
string int indexForId = 0; catch (exception e)
update_query = "update bool HaveException { }
travelagencytrips_tb set = false, NotInDatabase cout << "Please else
t_trip = '"+tripName+"' = false; Enter a valid {
where t_id = // Variables End NUMBER." << endl; cout << "Item
'"+strid+"'"; HaveException = Not Found in database."
const char* qu = cout << "Welcome To true; << endl;
update_query.c_str(); Travel Agency goto ExitMenu; }
qstate = Management System" } }
mysql_query(conn, qu); << endl << endl; //Project By
cout << "Delete User if (HaveException == CodeWithC.com
if (!qstate) Menu" << endl << endl; false) // Exit Code
{ { ExitMenu:
cout << endl stringstream cout << "Press 'm' to
<< "Successfully Saved qstate = streamid; Menu, 'd' to delete
In Database." << endl; mysql_query(conn, string strid; another record and any
} "select * from streamid << itemId; other key to Exit: ";
else travelagencytrips_tb"); streamid >> strid; cin >> choose;
{ if (!qstate) if (choose == 'm' ||
cout << { for (int i = 0; i < choose == 'M')
"Failed To Update!" << res = indexForId; i++) {
mysql_errno(conn) << mysql_store_result(conn { main();
endl; ); if (strid != }
} items[i]) else if (choose == 'd' ||
printf("--------------------- { choose == 'D')
} ------------------------------ NotInDatabase {
else ------\n"); = true; DeleteUser();
{ printf("| %-10s | %- }else }
cout << "Item 40s |\n", "Trip ID", "Trip { else
Not Found in database." Name"); NotInDatabase {
<< endl; while ((row = = false; exit(0);
} mysql_fetch_row(res))) break; }
} { } }
printf("| %-10s | }
ExitMenu: %-40s |\n", row[0],
cout << "Press 'm' to row[1]); if (NotInDatabase
Menu, 'e' to edit another == false)
item and any other key items[indexForId] = {
to Exit: "; row[0]; string
cin >> choose; indexForId++; delete_query = "delete
if (choose == 'm' || } from
choose == 'M') travelagencytrips_tb
{ where t_id =
printf("---------------------
main(); '"+strid+"'";
------------------------------
} const char* qd =
------\n");
else if (choose == 'e' || delete_query.c_str();
}
choose == 'E') qstate =
else
{ mysql_query(conn, qd);
{
EditTrip();
cout << "Query
} if (!qstate)
Execution Problem!" <<
else {
mysql_errno(conn) <<
{ cout <<
endl;
exit(0); "Successfully Deleted
}
} From Database." <<
} endl;
try
}
{
void DeleteTrip() else
cout << endl;
{ {
system("cls");
19 | P a g e