0% found this document useful (0 votes)
4 views73 pages

Imd238 Complete Merged 2

The document outlines a group assignment for an airline reservation system developed by students at Universiti Teknologi Mara. It details the system's objectives, mission, vision, functions, advantages, and challenges, emphasizing the importance of user-friendly interfaces and secure transactions. Additionally, it includes technical aspects such as the IT admin interface, algorithms, and C++ code snippets for managing customer and staff data.

Uploaded by

nurinjazlina4408
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views73 pages

Imd238 Complete Merged 2

The document outlines a group assignment for an airline reservation system developed by students at Universiti Teknologi Mara. It details the system's objectives, mission, vision, functions, advantages, and challenges, emphasizing the importance of user-friendly interfaces and secure transactions. Additionally, it includes technical aspects such as the IT admin interface, algorithms, and C++ code snippets for managing customer and staff data.

Uploaded by

nurinjazlina4408
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

UNIVERSITI TEKNOLOGI MARA

CAWANGAN SUNGAI PETANI, KEDAH

FACULTY OF INFORMATION MANAGEMENT


PROGRAMMING FOR INFORMATON PROFESSIONAL
(IMD 238)

GROUP ASSIGNMENT:
AIRLINES RESERVATION SERVICE

PREPARED FOR:
MADAM HIDAYAH

PREPARED BY:

NAME STUDENT
NUMBER

AEZRIANA BINTI AZIZI 2023384859

ARISSA SAFFIYA BINTI KHAIRUL ANWAR 2023172887

ELLISS SYAZWANI BINTI SUHAIMI 2023509745

NUR ALEYA SOFIA BINTI ZAMRI 2023385069

GROUP:
KCDIM1103B

SUBMISSION DATE:
3 JULY 2024
ACKNOWLEDGEMENT

Assalamualaikum, in the name of the most gracious and merciful Allah. Alhamdulilah for
giving us the stamina and patience to complete this task with the time given by our lecturer
Madam Hidayah. We would like to extend a special thank you to our lecturer, for her time
and efforts throughout the course of the year. We are truly appreciated your helpful tips and
suggestions as finished up our first assignment for (IMD 238) Programming for information
professional we will always be grateful to you for this.

Apart of that, we would like to give my sincere thanks to our group and our classmate, who
have shown a good cooperation with us. Thanks to them because they have shared a lot of
ideas and thought about this assignment. This task will not complete without any supports
from our friends and encouragement from Madam Hidayah. Most importantly, nobody has
been more important to us in the pursuit of this assignment than the members of our family.

We would like to thank our parents, whose love and guidance with us whenever we pursue.
They are the real our role models. We also acknowledge with a deep sense of reverence, our
gratitude towards our other faculty members of the campus for their valuable suggestions
given to us in completing the project.

THANK YOU
1. INTRODUCTION OF SYSTEM

For this project, we are making an airline reservation system to make it easier for customers to
booking fight ticket by online. The system is named by . As everyone knows that buying something
by online is a trend today. So, we are planning something that is efficient for customer. The advent
of online airline systems has revolutionized the way people book and manage air travel, offering
unprecedented convenience and efficiency. These digital platforms provide travelers with the
ability to search for flights, compare prices, and complete bookings from the comfort of their
homes or on the go, eliminating the need for physical visits to travel agencies or ticket counters.
With features such as real-time updates on flight status, automated check-ins, and personalized
travel alerts, online airline systems enhance the overall travel experience by providing seamless,
user-friendly interfaces. Additionally, these systems support the airlines by optimizing operations,
reducing costs, and enabling better resource management. As technology continues to advance,
online airline systems are set to further transform the aviation industry, making air travel more
accessible and efficient for everyone.

1.1. (Uleungdo Air Sys)

Uleungdo Air systems are the backbone of modern air travel operations, comprising a
suite of software and technologies vital for airline management. These systems
encompass reservations, ticketing, flight scheduling, crew management, maintenance,
and more, ensuring smooth and efficient airline operations.

At the heart of these systems is the Passenger Service System (PSS), or reservation
system, which manages flight inventory, passenger bookings, and seat assignments. It
enables customers to search for flights, make reservations, and purchase tickets
seamlessly.

Additionally, Departure Control Systems (DCS) oversee passenger check-in, boarding,


and flight management at airports, ensuring timely departures and efficient passenger
processing. Flight operations systems handle scheduling, route planning, crew
assignments, and maintenance scheduling, optimizing flight operations and safety.
Admin management in an airline system is includes overseeing flight operations,
passenger services, crew management, financial matters, regulatory compliance, human
resources, and facilities. Effective admin management ensures optimal resource
utilization, adherence to safety standards and regulations, and the delivery of excellent
service to passengers.

Revenue management systems analyze demand and set pricing and inventory controls
to maximize airline revenue, while baggage handling systems track and manage
baggage throughout the journey.

Customer Relationship Management (CRM) systems store and manage customer data,
facilitating personalized services and marketing efforts to enhance customer satisfaction
and loyalty.

Overall, airline systems play a critical role in ensuring the smooth functioning of
airlines, optimizing operations, enhancing safety, and delivering a seamless travel
experience for passengers.

1.2.Objective of System

1. Implement a secure booking system that handles user authentication,


passenger information, and payment processing securely.
2. Develop a robust search engine that allows users to search for flights based on
multiple criteria, including origin, destination, dates, number of passengers,
and preferred class.
3. Implement a smooth and efficient booking process with minimal steps to
reduce user friction.
4. Generate reports and insights to optimize the booking process, identify areas
for improvement, and enhance customer satisfaction.
5. Offer multiple channels for customer support, including live chat, email and
telephone support.
6. Display loyalty program benefits, elite status information, and personalized
offers to program members.
7. Provide mobile check-in capabilities through a dedicated mobile app or
mobile-responsive website.
8. Allow users to view booking details, check flight status, and make changes or
cancellations within the allowed time frame.
9. Enable users to view and download their e-tickets from their account
dashboard for easy access.
1.3 Mission of System

"Our mission is to provide a seamless, intuitive, and reliable online airline reservation
system that empowers travelers to easily plan and manage their journeys, ensuring
convenience, efficiency, and personalized service at every touchpoint. We strive to enhance
the travel experience through innovative technology, exceptional customer support, and a
commitment to safety and reliability."

1.4 Vision of System

We will delight our guest with genuine care and quality service. The simple vision is be the
world’s best airlines and being the best and aslo put the spirit of " Integrity, Performance,
Innovation" for every customer.

1.5 Function of System


The airline reservation system serves several critical functions that enhance both user
experience and operational efficiency. It allows users to search for flights based on criteria
such as origin, destination, date, number of passengers, and preferred class, providing the
ability to compare prices and select the best option. The system manages user accounts,
enabling secure login, profile updates, and the management of personal information. It
integrates with multiple payment gateways to facilitate secure transactions, supporting
various payment methods including credit cards, debit cards, and online banking. Real-time
information on flight schedules, availability, and pricing ensures users have the latest data.
Automated check-in features enable users to check-in online, select seats, and receive
mobile boarding passes. Additionally, the system allows users to view, modify, or cancel
their bookings, and access e-tickets. Multiple support channels such as live chat, email, and
telephone ensure prompt assistance. Loyalty program benefits are displayed, tracking
points and offering personalized promotions to members. The system also generates
insights on booking trends, customer preferences, and system performance to aid in
strategic decision-making, and ensures mobile compatibility through apps or responsive
websites.
1.6 Advantages of System

Our airline reservation system offers numerous advantages that significantly enhance the
travel experience for our customers. With an intuitive and user-friendly interface, travelers
can effortlessly search for flights, compare fares, and book tickets within minutes, all from
the comfort of their own homes or on the go. The system provides real-time updates on flight
availability, pricing, and schedules, ensuring that users always have access to the most
current information. Automated check-in and mobile boarding passes streamline the airport
experience, reducing wait times and stress. Additionally, personalized notifications keep
travelers informed about gate changes, delays, and other important updates. Our system also
supports multiple payment options and currencies, catering to a global clientele. By
integrating advanced security measures, we ensure that all transactions are safe and
confidential. Overall, our airline reservation system is designed to provide convenience,
efficiency, and peace of mind, making air travel more accessible and enjoyable for everyone.

1.7 Challenges of System

Implementing and maintaining an airline reservation system comes with several challenges.
Protecting sensitive customer data and ensuring secure transactions to prevent breaches and
fraud is paramount. The system must handle high traffic volumes, especially during peak
booking periods, without compromising performance. Ensuring compatibility and seamless
integration with existing airline and third-party systems, such as payment gateways and
CRM systems, is also crucial. Adherence to industry regulations and standards, including
data protection laws and aviation safety requirements, must be maintained. Continuous
improvement of the user interface to ensure it is intuitive and user-friendly is necessary to
reduce friction in the booking process. Maintaining system uptime and ensuring reliable
performance to avoid disruptions and ensure customer trust is a constant concern.
Providing efficient and effective customer support to handle a wide range of issues and
queries is essential. Keeping up with rapidly evolving technology and incorporating new
features to stay competitive is a continuous process. Supporting multiple languages,
currencies, and regional preferences to cater to a diverse customer base is important for
globalization. Finally, balancing the costs of development, maintenance, and upgrades
while delivering a high-quality service is a significant challenge.
2.1) IT ADMIN INTERFACE
Access and modify visitor data, such as preferences, special requests, and contact information.
Keep track of past visitor stays for individual attention. Adopt and oversee security measures to
safeguard confidential information. To maintain data integrity and performance, optimise and
maintain the database. Create routine backups and put a data recovery strategy into action.

2.1.1) Full Interface


(a) Analysis
Input: String admin staff ID, password Input, Function Admin Menu,
Output: Search Customer, Add New staff, Edit Staff, Display Total Staff,
Process: switch option

(b) Algorithm

Function adminLogin():
Display "Enter Admin Staff ID: "
Input staffIDInput

Display "Enter Password: "


Input passwordInput

For each index i from 0 to 100:


If passwordInput matches password[i]:
Display "Admin Login successful."
Call adminMenu() function
Return

Display "Invalid Admin Staff ID or Password. Try again."


Function adminMenu():
Repeat until user chooses to Logout:
Display Admin Menu options:
1. Search Customers
2. Add New Staff
3. Edit Staff
4. Display Total Staff
5. Logout

Input option

Switch option:
Case 1:
Call searchCust()
Break

Case 2:
Call newStaff()
Break

Case 3:
Call editStaff()
Break

Case 4:
Call displayTotalStaff()
Break
Case 5:
Display "Logout successful. Thank you!"
Return

Default:
Display "Invalid option. Try again."

(c) Coding C++

// Menu for IT Admin


void adminLogin() {
string staffIDInput, passwordInput;

cout << "Enter Admin Staff ID: ";


cin >> staffIDInput;

cout << "Enter Password: ";


cin >> passwordInput;

for (int i = 0; i <= 100; i++) {


if (passwordInput == password[i]) {
cout << "Admin Login successful." << endl;
int option;
do {
cout << "1. Search Customers " << "\n";
cout << "2. New Staff " << "\n";
cout << "3. Edit Staff " << "\n";
cout << "4. Staff Amount" << "\n";
cout << "5. Logout" << "\n";
cout << "Enter option: ";
cin >> option;
switch (option) {
case 1:
// Implement view all flights
break;

case 2:
searchCust();
break;

case 3:
newStaff();
break;

case 4:
// Implement staff management menu
break;

case 5:
cout << "Logout successful. Thank you!\n";
break;

default:
cout << "Invalid option. Try again.\n";
}
} while (option != 5);

return;
}
}
}
(a) Analysis
2.1.2) Search Customer
Input: Search Customer, Seat Customer
Output: String Total customer
Process: bookingID== bookingID
(b) Algorithm
Function calculateTotalCust():
Open customer.dat for reading

If customer.dat fails to open:


Display "Error opening customer.dat"
Return -1

Initialize totalCust to 0
Initialize array bookingID to store unique customer IDs

While reading lines from customer.dat:


Read bookingID from file

If bookingID is not already in bookingID array:


Add bookingID to bookingID array
Increment totalCust
Close customer.dat
Return totalCust
}
}
}
(c) Coding C++
void searchCust(){
string username;
cout << "Enter Customer Name: ";
cin >> username; // Prompt user for Customer Name

for(int i=0;i<100;i++)
{
if (username == name[i]) // Check if the provided customer name matches existing records
{
cout<<"Customer ID: "<<bookingID[i]; // Display booking ID seat number
cout<<"Seat Number: "<<seat[i];
}
}
}
int calculateTotalCust() {
ifstream custFile("customer.dat");

if (!custFile.is_open()) {
cerr << "Error opening customer.dat" << endl;
return -1; // Return -1 to indicate an error
}

int totalCust = 0, allCust;

while (getline(custFile, bookingID[100])) {


// Successfully read a booking ID
bool isUnique = true;
// Check if the current customer ID is already encountered
for (int i = 0; i < 100; ++i) {
if (bookingID[i] == bookingID[100]) {
isUnique = false;
break;
}
}
if (isUnique) {
// Increment total customer count only if the customer ID is unique
totalCust++;
allCust = totalCust/6;
}
}
custFile.close();
return allCust; // Return the total number of unique customer IDs
}
(a) Analysis
2.1.3) Staff Data
Input: String staffData, staffName, staffIInput, PasswordInput,
Output: StaffData, StaffName, Staffinput, PasswordInput
Process: "Total staff : " << allStaff <<

(b) Algorithm

Function editStaffData(staffToEdit):
Open staff.dat for reading
Open temp.dat for writing

While reading lines from staff.dat:


Read staffID, password, staffname, roles

If staffID matches staffToEdit:


Display "Enter new password for staff " + staffToEdit + ": "
Input new password
Update password

Display "Enter new name for staff " + staffToEdit + ": "
Input new staffname
Update staffname

Display "Enter new role for staff " + staffToEdit + ": "
Input new roles
Update roles
Display "Staff details updated successfully."

Write staffID, password, staffname, roles to temp.dat

Close staff.dat and temp.dat


Replace staff.dat with temp.dat

(c) Coding C++

void newStaff() {
int i = 0;

ofstream staffFile("staff.dat", ios::app); // Open staff.dat file in append mode

// Prompt user for staff details and store in arrays


cout << "Enter Staff ID: ";
cin >> staffID[i];
staffFile << staffID[i] << "\n";

cout << "Enter Password: ";


cin >> password[i];
staffFile << password[i] << "\n";

cout << "Enter Staff Name: ";


cin >> staffname[i];
staffFile << staffname[i] << "\n";
cout << "Enter Staff Role: ";
cin >> roles[i];
staffFile << roles[i] << "\n";

staffFile.close(); // Close the staff.dat file

return;

void editStaffData(const std::string& staffToEdit) {


std::ifstream inFile("staff.dat");
std::ofstream outFile("temp.dat");

std::string staffID, password, staffname, roles;

while (getline(inFile, staffID) && getline(inFile, password) && getline(inFile, staffname) &&
getline(inFile, roles)) {
if (staffID == staffToEdit) {
// Allow the user to update details
std::cout << "Enter new password for staff " << staffToEdit << ": ";
std::getline(std::cin >> std::ws, password); // Use getline to read entire line

std::cout << "Enter new name for staff " << staffToEdit << ": ";
std::getline(std::cin >> std::ws, staffname);

std::cout << "Enter new role for staff " << staffToEdit << ": ";
std::getline(std::cin >> std::ws, roles);

std::cout << "Staff details updated successfully." << std::endl;


}

// Write the staff details to the temp file


outFile << staffID << '\n' << password << '\n' << staffname << '\n' << roles << '\n';
}

inFile.close();
outFile.close();

// Replace the original file with the temp file


std::remove("staff.dat");
std::rename("temp.dat", "staff.dat");
}

void editStaff() {
std::string staffIDInput;

std::cout << "Enter staff ID to edit: ";


std::getline(std::cin >> std::ws, staffIDInput);

editStaffData(staffIDInput);

int calculateTotalStaff() {
ifstream staffFile("staff.dat");

if (!staffFile.is_open()) {
cerr << "Error opening staff.dat" << endl;
return -1; // Return -1 to indicate an error
}

int totalStaff = 0, allStaff;


while (getline(staffFile, staffID[50])) {
// Successfully read a staff ID
bool isUnique = true;
// Check if the current staff ID is already encountered
for (int i = 0; i < 50; ++i) {
if (staffID[i] == staffID[50]) {
isUnique = false;
break;
}
}

if (isUnique) {
// Increment total staff count only if the staff ID is unique
totalStaff++;
allStaff = totalStaff/3;
}
}

staffFile.close();
return allStaff; // Return the total number of unique staff IDs
}

void staffAmount() {
int allStaff = calculateTotalStaff();

if (allStaff == -1) {
// Handle error opening the file
cout << "Error opening staff.dat" << endl;
} else {
cout << "Total staff : " << allStaff << endl;
}

}
(d) Flowchart

START

Admin login

Login successful

Yes

Enter customer Search customer

No Yes

Enter new staff

Search new staff

No Yes

Enter edit staff Search edit staff

No Yes

Enter staff Amount Search staff amount

No

Logout

END
2.2) OPERATION INTERFACE
An airline operation interface is a critical component of airline management systems, designed to
facilitate the efficient operation and coordination of various tasks involved in running an airline.
This interface serves as a centralized platform where airline operations staff, including
dispatchers, ground crews, and maintenance personnel, can access and manage essential
information in real-time.

2.2.1) Full Interface


(a) Analysis
Input: Integer option
Output: searchFlight, addFlight, updateFlight, editFlightStatus, cancelFlight
Process: switch option

(b) Algorithm

Function adminMenu():
Repeat until user chooses to Logout:
Display Admin Menu options:
1. Search Flight
2. Add Flight
3. Update Flight Status
4. Edit Flight Status
5. Cancel Flight
6. Logout

Input option

Switch option:
Case 1:
Call searchFlight()
Break

Case 2:
Call addFlight()
Break

Case 3:
Call updateFlightStatus()
Break

Case 4:
Call editFlightStatus()
Break

Case 5:
Call cancelFlight()
Break

Case 6:
Display "Logout successful. Thank you!"
Return

Default:
Display "Invalid option. Try again."

(c) Coding c++

// Menu for Flight Operations


void operationLogin() {
string staffIDInput, passwordInput;

cout << "Enter Staff ID: ";


cin >> staffIDInput;
cout << "Enter Password: ";
cin >> passwordInput;

for (int i = 0; i <= 100; i++) {


if (staffIDInput == staffID[i] ) {
cout << "Login successful." << endl;
int option;
do {
cout << "1. Search Flight " << "\n";
cout << "2. Add Flight " << "\n";
cout << "3. Update Flight Status " << "\n";
cout << "4. Edit Flight Details" << "\n";
cout << "5. Cancel Flight" << "\n";
cout << "6. Logout" << "\n";
cout << "Enter option: ";
cin >> option;

switch (option) {
case 1:
viewFlight();
break;

case 2:
addFlight();
break;

case 3:
// Implement update flight status
break;

case 4:
// Implement edit flight details
break;

case 5:
// Implement cancel flight
break;

case 6:
cout << "Logout successful. Thank you!\n";
break;

default:
cout << "Invalid option. Try again.\n";
}

} while (option != 6);

return;
}
}
cout << "Login failed. User not found.\n";
}

void addFlight() {
int i = 0;

ofstream flightFile ("flight.dat", ios::app);

cout<<"Flight Number : ";


cin>>flightNumber[i];
flightFile << flightNumber[i] << "\n" ;

cout<<"Origin : ";
cin>>origin[i];
flightFile << origin[i] << "\n" ;

cout<<"Destination : ";
cin>>destination[i];
flightFile << destination[i] << "\n" ;

cout<<"Departure Time : ";


cin>>departureTime[i];
flightFile << departureTime[i] << "\n" ;

cout<<"ArrivalTime : ";
cin>>destination[i];
flightFile << arrivalTime[i] << "\n" ;

cout<<"Price : ";
cin>>price[i];
flightFile << price[i] << "\n" ;

cout<<"Flight Added Successfully!";

flightFile.close();
}

void viewFlight()
{
int i,found=0;
string fno;

cout << "Enter Flight Number: ";


cin >> fno;
for(i=0;i<50;i++){
if(flightNumber[i] == fno){
found=1;
break;
}
}
if(found==1)
{
cout<<"Flight Details\n";
cout<<"\nFlight Number: " << flightNumber[i];
cout<<"\nOrigin: " << origin[i];
cout<<"\nDestination: " << destination[i];
cout<<"\nDeparture Time: " << departureTime[i];
cout<<"\nArrival Time: " << arrivalTime[i];
cout<<"\nPrice: " << price[i];
}
else
{
cout<<"\nFlight not found";
}
}
(d) Flowchart

START

Operation Login

Login Succesful

Available flight

Enter Add Enter View Enter Enter Flight Status

Flight Flight Update Flight

Search Add Flight Search View Flight Search Update Flight Search FlightStatus

View Flight Add Flight Update Flight Flight

Status Status Status Status

END
2.2.2) Add Flight
(a) Analysis
Input: String FlightNumber, Origin, Destination, DepartureTime, ArrivalTime, Price
Output: Display flight number, origin, flight destination, flight departure time, flight
arrival time and price
Process: switch option

(b) Algorithm

Begin addFlight
Input flightNumber, origin, destination, departureTime, arrivalTime, price
For each added flight
Display “Flight Number”
Display “Origin”
Display “Departure Time”
Display “Arrival Time”
Display “Price”
End For
Display “Flight Added Successfully”
End addFlight

(c) Coding c++

void addFlight() {
int i = 0;

ofstream flightFile ("flight.dat", ios::app);

cout<<"Flight Number : ";


cin>>flightNumber[i];
flightFile << flightNumber[i] << "\n" ;
cout<<"Origin : ";
cin>>origin[i];
flightFile << origin[i] << "\n" ;

cout<<"Destination : ";
cin>>destination[i];
flightFile << destination[i] << "\n" ;

cout<<"Departure Time : ";


cin>>departureTime[i];
flightFile << departureTime[i] << "\n" ;

cout<<"ArrivalTime : ";
cin>>destination[i];
flightFile << arrivalTime[i] << "\n" ;

cout<<"Price : ";
cin>>price[i];
flightFile << price[i] << "\n" ;

cout<<"Flight Added Successfully!";

flightFile.close();
}
(d)Flowchart

BEGIN

Int i; string flight number,


origin,
destination, departureTime,
arrivalTime, price

flightNumber[i]

origin[i]

destination[i]

departureTime[i]

arrivalTime[i]
price[i]

Flight Added Sucessful

addFlightFile.close

END
2.2.3) View Flight

(a) Analysis
Input: String fno
Output: Flight Number, Origin, Destination, Departure Time, Arrival Time, Price
Process: if flightNumber[i] == fno

(b) Algorithm

Begin viewFlight
int i
string fno
Display Enter Flight number:
Read flightNo
For i=0;i<50;++i
if flightNo = flightNumber[i]
Display “Flight Details”:
Display “Flight Number”:
Display “Origin”:
Display “Destination”:
Display “Departure Time”:
Display “Arrival Time”:
Display “Price”:
End
else
Display Flight not found.
End viewFlight
(c) Coding c++

void viewFlight()
{
int i,found=0;
string fno;

cout << "Enter Flight Number: ";


cin >> fno;
for(i=0;i<50;i++){
if(flightNumber[i] == fno){
found=1;
break;
}
}
if(found==1)
{
cout<<"Flight Details\n";
cout<<"\nFlight Number: " << flightNumber[i];
cout<<"\nOrigin: " << origin[i];
cout<<"\nDestination: " << destination[i];
cout<<"\nDeparture Time: " << departureTime[i];
cout<<"\nArrival Time: " << arrivalTime[i];
cout<<"\nPrice: " << price[i];
}
else
{
cout<<"\nFlight not found";
}
}
(d) Flowchart

START

int i,found=0;
string fno;

No
found Not found

Yes
flightdDetails

Yes
flightNumber

Yes

origin

Yes
destination

Yes
departureTime

Yes

arrivalTime
END
2.3) CUSTOMER INTERFACE
An airline's customer interface is designed to streamline the travel experience by offering essential features
such as flight search and booking, seat selection, online check-in, and the ability to manage bookings. It
provides real-time updates on flight statuses, gate changes, and in-flight amenities, ensuring passengers
stay informed. The interface also supports customer support services, and management of frequent flyer
programs, enhancing convenience and personalization. Integrated into mobile apps, these features optimize
accessibility and efficiency, aiming to deliver a seamless and satisfying journey for travelers.
2.3.1) Full Interface
a) Analysis
Input: Integer option
Output: checkInFlight, customerData, newCust
Process: switch option

(b) Algorithm
Begin customerLogin
int option
do
Display 1. Check In Flight
Display 2. Customer Data
Display 3. Add New Customer Booking
Display 4. Logout
Display Enter option:
Read option

switch option
case I:
Call checkInFlight
case 2:
Call customerData
case 3:
Call newCustBooking
case 4:
Display Logout successful. Thank you!
break
default:
Display Invalid option. Try again.

while option != 3
End

Begin checkInFlight

int i

string flightNo, bookingNo, flightStatus

Display Enter booking id:

Read bookingNo

Display Enter Flight number:

Read flightNo

For i=0;i<50;++i

if flightNo = flightNumber[i] && bookingID[i] = bookingNo

Display Passenger Name:

Display Booking ID:

Display Flight Number:

Display Departure Date and Time:

Display Flight Class:

Display Seat Number:

Display Phone Number:


flightStatus[i] = Booked

Display Flight booked successfully by

End

else

Display Flight not available for booking.

End checkInFlight

Begin newCust

int bil=0, i=0

Declare "customer.data"

i=i+1

bil=i+1

Display Enter ID:

Read bookingID[1]

Display bookingID(1]

Display Enter Name:

Read name[i]

Display name[i]

Display Enter ID:

Read bookingID[1]

Display bookingID(1]

Display flight number:

Read flight number[i]

Display depature date and time:

Read depature date and time[i]


Display depature date and time[i]

Display Seat Class:

Read seat class[i]

Read seat class[i]

Display Enter Seat Number:

Read seat[i]

Display seat[i]

Display Enter Phone Number:

Read phone_no[i]

Display phone_ no[i]

custFile.close

End newCust

(c) Coding c++

#include <iostream>

#include <fstream>

#include <string>

using namespace std;

// Function declarations

void readCustData();

void readOperationData();

void readAdminData();
void readBankData();

void readFlightAmount();

void welcomeLogin();

void customerLogin();

void operationLogin();

void adminLogin();

void bankLogin();

void checkInFlight();

void newBooking();

// Global arrays for customers data

string name[100];

string flightNumber[100];

string bookingID[100];

string departureDateAndTime[100];

string flightClass[100];

string seat[100];

string phoneNumber[100];

// Global arrays for counter loop

int totalStaff = 0; // Counter for total staffs

int totalCust = 0; // Counter for total customers

int main() {

readCustData();

readOperationData();
readAdminData();

readBankData();

welcomeLogin();

return 0;

// Read Customer Details

void readCustData(){

ifstream custFile("customer.dat");

for (int i = 0; i < 100; ++i) {

getline(custFile, name[i]);

getline(custFile, bookingID[i]);

getline(custFile, flightNumber[i]);

getline(custFile, departureDateAndTime[i]);

getline(custFile, flightClass[i]);

getline(custFile, seat[i]);

getline(custFile, phoneNumber[i]);

i=i+1;

custFile.close();

// Main Menu in System

void welcomeLogin() {

int option;
do {

cout << "WELCOME TO ULEUNGDO AIRLINE " << "\n\n";

cout << "1. Customer " << "\n";

cout << "2. Flight Operations " << "\n";

cout << "3. IT Admin " << "\n";

cout << "4. Bank " << "\n";

cout << "5. Logout" << "\n";

cout << "Enter option: ";

cin >> option;

switch (option) {

case 1:

customerLogin();

break;

case 2:

operationLogin();

break;

case 3:

adminLogin();

break;

case 4:

bankLogin();

break;

case 5:
cout << "Logout successful. Thank you!\n";
break;

default:

cout << "Invalid option. Try again.\n";

} while (option != 5);

return;

// Menu for Customers

void customerLogin() {

int option;

do {

cout << "1. Check In Flight " << "\n";

cout << "2. New Booking" << "\n";

cout << "3. Edit Booking" << "\n";

cout << "4. Cancel Booking" << "\n";

cout << "5. Logout" << "\n";

cout << "Enter option: ";

cin >> option;

switch (option) {

case 1:

checkInFlight();

break;

case 2:
newBooking();

break;

case 3:

// Implement edit booking function

break;

case 4:

// Implement cancel booking function

break;

case 5:

cout << "Logout successful. Thank you!\n";

break;

default:

cout << "Invalid option. Try again.\n";

} while (option != 5);

return;

void checkInFlight(){

string flightNo, bookingNo,flightStatus;

cout<<"\nEnter booking id: ";

cin>>bookingNo;

cout<<"Enter Flight number : ";


cin>>flightNo;

for(int i=0;i<50;++i){

if (flightNo == flightNumber[i] && bookingID[i] == bookingNo){

cout << "Passenger Name: " << name[i] << "\n";

cout << "Booking ID " << bookingID[i] << "\n";

cout << "Flight Number: " << flightNumber[i] << "\n";

cout << "Departure Date and Time: " << departureDateAndTime[i] << "\n";

cout << "Flight Class:" << flightClass[i] <<"\n";

cout << "Seat Number:" << seat[i] << "\n";

cout << "Phone Number: " << phoneNumber[i] << "\n";

cout << "Check-in successful for " << name[i] << endl;

return;

cout << "Booking not found or flight mismatch." << endl;

void newBooking() {

int i = totalCust; // Use the next available index

ofstream custFile("customer.dat", ios::app);

cout << "Enter Name: ";

cin >> name[i];

custFile << name[i] << "\n";

cout << "Enter Booking ID: ";


cin >> bookingID[i];

custFile << bookingID[i] <<"\n";

cout << "Enter Flight Number: ";

cin >> flightNumber[i];

custFile << flightNumber[i] << "\n";

cout << "Enter Departure Date and Time: ";

cin >> departureDateAndTime[i];

custFile << departureDateAndTime[i] << "\n";

cout << "Enter Flight Class: ";

cin >> flightClass[i];

custFile << flightClass[i] << "\n";

cout << "Enter Seat Number: ";

cin >> seat[i];

custFile << seat[i] << "\n";

cout << "Enter Phone Number: ";

cin >> phoneNumber[i];

custFile << phoneNumber[i] << "\n";

totalCust++; // Increment the total customer count

custFile.close();

int calculateNewBookingCust() {
ifstream custFile("customer.dat");

if (!custFile.is_open()) {

cerr << "Error opening customer.dat" << endl;

return -1; // Return -1 to indicate an error

int totalCust = 0, allCust;

while (getline(custFile, bookingID[100])) {

// Successfully read a booking ID

bool isUnique = true;

// Check if the current customer ID is already encountered

for (int i = 0; i < 100; ++i) {

if (bookingID[i] == bookingID[100]) {

isUnique = false;

break;

if (isUnique) {

// Increment new booking the customer ID is unique

totalBookingCust++;

allBookingCust = totalNewBookingCust/6;

custFile.close();

return addNewBookingCust; // New booking of unique customer IDs

d) Flow chart
START

User Login

Login Successful

Yes

Check In Flight Check In Flight

No

Yes

Add New Customer Add New Customer

No

Yes

Log Out Log Out Successful

End
2.3.2) Check In Flight

The check-in flight system enables passengers to enter their details, select seats, and confirm their
registration before flight departure. It ensures smooth processing with seat availability checks and error
handling for accurate and efficient check-in experiences.

a) Analysis

Input: passenger name, passenger flight number, passenger seat number

Output: Display Check In Flight

Process: show option

b) Algorithm

Begin checkInFlight

int i

string flightNo, bookingNo, flightStatus

Display Enter booking id:

Read bookingNo

Display Enter Flight number:

Read flightNo

For i=0;i<50;++i

if flightNo = flightNumber[i] && bookingID[i] = bookingNo

Display Passenger Name:

Display Booking ID:

Display Flight Number:

Display Departure Date and Time:

Display Flight Class:

Display Seat Number:

Display Phone Number:


flightStatus[i] = Booked

Display Flight booked successfully by

End

else

Display Flight not available for booking.

End checkInFlight

c) Coding ++

void checkInFlight(){

string flightNo, bookingNo,flightStatus;

cout<<"\nEnter booking id: ";

cin>>bookingNo;

cout<<"Enter Flight number : ";

cin>>flightNo;

for(int i=0;i<50;++i){

if (flightNo == flightNumber[i] && bookingID[i] == bookingNo){

cout << "Passenger Name: " << name[i] << "\n";

cout << "Booking ID " << bookingID[i] << "\n";

cout << "Flight Number: " << flightNumber[i] << "\n";

cout << "Departure Date and Time: " << departureDateAndTime[i] << "\n";

cout << "Flight Class:" << flightClass[i] <<"\n";

cout << "Seat Number:" << seat[i] << "\n";

cout << "Phone Number: " << phoneNumber[i] << "\n";

cout << "Check-in successful for " << name[i] << endl;

return;

cout << "Booking not found or flight mismatch." << endl;

}
d) Flow Chart

Begin

string flightNo, bookingNo,flightStatus;

No (flightNo ==

flightNumber[i]&& bookingID[i]

== bookingNo)

Yes

Read flightNumber and bookingID

Display Check In Detail

Check In Successful

END
2.3.3) Add Customer New Booking

The "add customer" feature in airline systems facilitates quick and accurate registration of passenger
details, including name, contact information, and travel preferences. It streamlines booking processes,
supports personalized service through customer profile management, and enhances operational
efficiency. This feature also aids in targeted marketing and loyalty program management, contributing
to improved customer satisfaction and service quality within the airline industry.

a) Analysis
Input: new customer name, new customer age, new customer flight number
Output: customer added successfully
Process: option success

b) Algorithm

Begin newCust

int bil=0, i=0

Declare "customer.data"

i=i+1

bil=i+1

Display name

Read name[i]

Display name[i]

Display Enter ID:

Read bookingID[1]

Display bookingID(1]

Display flight number:

Read flight number[i]

Display flight number[i]


Display depature date and time

Read depature date and time[i]

Display depature date and time[i]

Display Seat Class:

Read seat class[i]

Read seat class[i]

Display Enter Seat Number:

Read seat[i]

Display seat[i]

Display Enter Phone Number:

Read phone_no[i]

Display phone_ no[i]

custFile.close

End newCust
c) Coding ++

void newBooking() {

int i = addBooking; // Use the next available index

ofstream custFile("customer.dat", ios::app);

cout << "Enter Name: ";

cin >> name[i];

custFile << name[i] << "\n";

cout << "Enter Booking ID: ";

cin >> bookingID[i];

custFile << bookingID[i] <<"\n";

cout << "Enter Flight Number: ";

cin >> flightNumber[i];

custFile << flightNumber[i] << "\n";

cout << "Enter Departure Date and Time: ";

cin >> departureDateAndTime[i];

custFile << departureDateAndTime[i] << "\n";

cout << "Enter Flight Class: ";

cin >> flightClass[i];

custFile << flightClass[i] << "\n";

cout << "Enter Seat Number: ";

cin >> seat[i];


custFile << seat[i] << "\n";

cout << "Enter Phone Number: ";

cin >> phoneNumber[i];

custFile << phoneNumber[i] << "\n";

addBooking++; // Increment the new booking customer

custFile.close();

}
d) FLOWCHART

Begin

int i = addBooking; // Use the

next available index

addNewCustBooking

passengerName

bookingID

flightNumber

depatureDateAndTime

seatNumber
phoneNumber

custFile.Close

End
2.4) BANK INTERFACE
The bank department in an airline, often referred to as the banking operation, is a crucial aspect of
flight scheduling and airline operations management. This department is responsible for organizing
and managing the arrival and departure of flights in coordinated time frames, commonly known as
"banks." The main objective of banking operations is to maximize connectivity between inbound
and outbound flights, thereby enhancing passenger convenience and optimizing aircraft utilization.
In a typical bank structure, flights from various origins arrive within a short period, allowing
passengers to transfer seamlessly to multiple outbound flights departing shortly after.

2.4.1) Full Interface


(a) Analysis
Input: String staffIDInput, passwordInput, integer option
Output: displayResit, newAcc, editAcc, deleteAcc
Process: Switch option, if passwordInput == password[i]

(b) Algorithm

Procedure bankLogin()
Input: None
Output: None

Display "Enter Bank Staff ID: "


Read staffIDInput

Display "Enter Password: "


Read passwordInput

found <- false


for i <- 0 to 100 do
if passwordInput equals password[i] then
Display "Bank Login successful."
option <- 0
repeat
DisplayMenu()
option <- ReadOption()
switch option do
case 1:
displayReceipt()
case 2:
addNewAccount()
case 3:
editAccount()
case 4:
deleteAccount()
case 5:
Display "Logout successful. Thank you!"
otherwise:
Display "Invalid option. Try again."
until option equals 5
found <- true
break
end for

if found equals false then


Display "Bank Login failed. User not found."
end if

End Procedure

Procedure displayReceipt()
Input: None
Output: None

Display "Enter Account ID: "


Read accID
Display "Enter Seat Number: "
Read seatNo

found <- false


for i <- 0 to 50 do
if accNum[i] equals accID and seat[i] equals seatNo then
Display "Enter Number of Seats: "
Read days
RM <- ConvertToInt(seat[i])
transaction <- ConvertToFloat(balance[i])
billAmount <- days * RM

Display "######## Receipt Details ########"


Display "Account Name : " + accName[i]
Display "Account Balance : RM" + balance[i]
Display "Latest Transaction : RM" + billAmount
Display "Latest Balance: RM" + (transaction - billAmount)

found <- true


break
end for

if found equals false then


Display "Account not found."
end if

End Procedure

Procedure addNewAccount()
Input: None
Output: None
OpenFile("bank.dat", "append")
Display "Enter Name: "
Read accName
WriteToFile(accName)

Display "Enter Account ID: "


Read accNum
WriteToFile(accNum)

Display "Enter Account Balance: "


Read balance
WriteToFile(balance)

CloseFile("bank.dat")

End Procedure

Procedure editAccount()
Input: None
Output: None

Display "Enter account name to edit: "


Read accNameInput
editAccountDetails(accNameInput)

End Procedure

Procedure editAccountDetails(accountName)
Input: accountName (string)
Output: None

OpenFile("bank.dat", "read")
OpenFile("temp.dat", "write")
while not EndOfFile("bank.dat") do
Read accNameFromFile
Read accNumFromFile
Read balanceFromFile
if accNameFromFile equals accountName then
Display "Enter new account name for " + accountName + ": "
Read newAccName
Display "Enter new account number for " + accountName + ": "
Read newAccNum
Display "Enter new balance for " + accountName + ": "
Read newBalance
WriteToFile(newAccName)
WriteToFile(newAccNum)
WriteToFile(newBalance)
else
WriteToFile(accNameFromFile)
WriteToFile(accNumFromFile)
WriteToFile(balanceFromFile)
end if
end while

CloseFile("bank.dat")
CloseFile("temp.dat")
DeleteFile("bank.dat")
RenameFile("temp.dat", "bank.dat")

End Procedure
Procedure deleteAccount()
Input: None
Output: None

Display "Enter account number to delete: "


Read accToDelete
deleteAccountDetails(accToDelete)

End Procedure

Procedure deleteAccountDetails(accountNumber)
Input: accountNumber (string)
Output: None

for i <- 0 to 50 do
if accNum[i] equals accountNumber then
for j <- i to 49 do
accName[j] <- accName[j + 1]
accNum[j] <- accNum[j + 1]
balance[j] <- balance[j + 1]
end for
Clear(accName[50])
Clear(accNum[50])
Clear(balance[50])

Display "Account deleted successfully."

OpenFile("bank.dat", "write")
for k <- 0 to 49 do
WriteToFile(accName[k])
WriteToFile(accNum[k])
WriteToFile(balance[k])
end for
CloseFile("bank.dat")

return
end if
end for

Display "Account not found."

End Procedure

(c) Coding C++

void bankLogin() {
string staffIDInput, passwordInput;

cout << "Enter Bank Staff ID: ";


cin >> staffIDInput;

cout << "Enter Password: ";


cin >> passwordInput;

for (int i = 0; i <= 100; i++) {


if (passwordInput == password[i]) {
cout << "Bank Login successful." << endl;
int option;
do {
cout << "1. Display Receipt " << "\n";
cout << "2. Add New Account " << "\n";
cout << "3. Edit Account Details " << "\n";
cout << "4. Delete Account " << "\n";
cout << "5. Logout" << "\n";
cout << "Enter option: ";
cin >> option;
switch (option) {
case 1:
displayResit();
break;

case 2:
newAcc();
break;

case 3:
editAcc();
break;

case 4:
deleteAcc();
break;

case 5:
cout << "Logout successful. Thank you!\n";
break;

default:
cout << "Invalid option. Try again.\n";
}
} while (option != 5);

return;
}
}
cout << "Bank Login failed. User not found.\n";
}

void displayResit(){
int i, days, RM[50], accAmount;
string seatNo, accID; // Assuming this is a string, adjust if it's an integer
float transaction, billAmount;

// Prompt user for account ID and seat number


cout << "Enter Account ID: ";
cin>>accID;
cout << "Enter Seat Number: ";
cin>>seatNo;

for (i = 0; i < 50; i++) {


if (accNum[i] == accID && seatNo == seat[i]) { // Check if the provided account ID and seat
number match existing records
cout << "\nEnter Number of Seat:\t";
cin >> days;

// Convert rent and balance to appropriate data types


RM[50] = std::stoi(seat[i]);
transaction = std::stof(balance[i]);

float billAmount = days * RM[50]; // Corrected variable usage


// Display receipt details
cout << "\n\t######## Resit Details ########\n";
cout << "\nAccount Name : " << accName[i];
cout << "\nAccount Balance : RM" << balance[i];
cout << "\nLatest Transaction : RM" << billAmount;
cout << "\nLatest Balance: RM" << transaction - billAmount << "\n";

}
}
}

void newAcc(){
int bil=0, i=0;

ofstream custFile("bank.dat", ios::app); // Open bank.dat file in append mode


i=i+1;
bil=i+1;

// Prompt user for account details and store in arrays


cout << "Enter Name: ";
cin >> accName[i];
custFile << accName[i] << "\n";

cout << "Enter Account ID: ";


cin >> accNum[i];
custFile << accNum[i] <<"\n";

cout << "Enter Account Amount: ";


cin >> balance[i];
custFile << balance[i] << "\n";

bil=bil+1;
custFile.close(); // Close the bank.dat file

void editAccData(const std::string& bankToEdit) {


std::ifstream inFile("bank.dat");
std::ofstream outFile("temp.dat");

std::string accName,accNum,balance;

while (getline(inFile, accName) && getline(inFile, accNum) && getline(inFile, balance)) {


if (accName ==bankToEdit) {
// Allow the user to update details
std::cout << "Enter new account name for bank " << bankToEdit << ": ";
std::getline(std::cin >> std::ws, accName); // Use getline to read entire line

std::cout << "Enter new account number for bank " << bankToEdit << ": ";
std::getline(std::cin >> std::ws, accNum);

std::cout << "Enter new balance for bank " <<bankToEdit << ": ";
std::getline(std::cin >> std::ws, balance);

// Write the room details to the temp file


outFile << accName << '\n' << accNum << '\n' << balance <<'\n';
}
inFile.close();
outFile.close();

// Replace the original file with the temp file


std::remove("bank.dat");
std::rename("temp.dat", "bank.dat");
}

void editAcc() {
std::string accNameInput;

std::cout << "Enter account name to edit: ";


std::cin >> accNameInput;

editAccData(accNameInput);

void deleteAccData(const std::string& accToDelete) {


for (int i = 0; i < 50; ++i) {
if (accNum[i] == accToDelete) {
// Shift elements to fill the gap
for (int j = i; j < 50 - 1; ++j) {
accName[j] = accName[j + 1];
accNum[j] = accNum[j + 1];
balance[j] = balance[j + 1];

}
// Clear the last element to avoid duplicate data
accName[50 - 1].clear();
accNum[50 - 1].clear();
balance[50 - 1].clear();

std::cout << "Account deleted successfully." << std::endl;

// Update the file after deletion


std::ofstream bankFile("room.dat");
for (int k = 0; k < 50 && !accName[k].empty(); ++k) {
bankFile << accName[k] << '\n';
bankFile << accNum[k] << '\n';
bankFile << balance[k] << '\n';

}
bankFile.close();

return;
}
}
std::cout << "Account not found." << std::endl;
}

void deleteAcc() {
readBankData();

std::string accToDelete;
std::cout << "Enter account number to delete: ";
std::cin >> accToDelete;

deleteAccData(accToDelete);

}
(d) Flowchart

START

int=0; i< 100, i++

Bank Login Sucessful

Yes
Display Resit Display Resit

No Yes
Add New Account New Account

No Yes
Edit Account Edit Account Details
Details

No Yes
Delete Account Delete Account

No
Yes
Log Out Log Out Successful

END
3.0 CONCLUSION

Uleungdo Airlines, established with a vision to connect the remote and picturesque island of
Uleungdo to mainland South Korea and international destinations, has successfully carved out a
niche in the aviation industry. Despite initial challenges, including logistical hurdles and
operational complexities due to Uleungdo's unique geographical location, the airline has
persevered.

Through strategic partnerships and investments in modern aircraft and technology, Uleungdo
Airlines has ensured safe, reliable, and efficient air travel for both residents and tourists alike. The
airline's commitment to exceptional customer service and sustainability practices has garnered
praise and loyalty from passengers.

Looking ahead, Uleungdo Airlines aims to expand its route network, enhancing connectivity and
accessibility to and from Uleungdo. With a focus on community engagement and environmental
stewardship, the airline continues to uphold its values while embracing opportunities for growth
in the dynamic aviation industry.

Uleungdo Airlines remains dedicated to bridging distances, enriching travel experiences, and
contributing to the economic and cultural development of Uleungdo and its surrounding regions.

You might also like