Professional Documents
Culture Documents
html
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include<iomanip>
using namespace std;
main ()
{
do
{
menu=menuOption();
if(menu==1)
{
do
{
user++;
system("CLS");
cout.setf(ios::left);
cout << "-------------------------WELCOME TO TRAVEL PACKAGE-------------------------" << endl;
cout<<"\n---------------------------------------------------------------------------"<<endl;
cout<<setw(10)<<" CODE"<<setw(15)<<"COMPANY"<<setw(30)<<"DESTINATION"<<setw(20)<<"PRICE"<<endl;
cout<<"---------------------------------------------------------------------------"<<endl;
cout<<setw(10)<<" 1"<<setw(15)<<"AIR ASIA"<<setw(30)<<"(A) PULAU LANGKAWI"<<setw(20)<<"ADULT\tRM294.30"<<endl;
cout<<setw(10)<<""<<setw(15)<<""<<setw(30)<<""<<setw(20)<<"CHILDREN\tRM255.50"<<endl;
cout<<setw(10)<<""<<setw(15)<<""<<setw(30)<<"(B) PULAU TIOMAN"<<setw(20)<<"ADULT\tRM484.00"<<endl;
cout<<setw(10)<<""<<setw(15)<<""<<setw(30)<<""<<setw(20)<<"CHILDREN\tRM344.00"<<endl;
cout<<setw(10)<<""<<setw(15)<<""<<setw(30)<<"(C) PULAU PANGKOR"<<setw(20)<<"ADULT\tRM510.00"<<endl;
cout<<setw(10)<<""<<setw(15)<<""<<setw(30)<<""<<setw(20)<<"CHILDREN\tRM398.00"<<endl;
system("CLS");
cout.setf(ios::left);
cout.setf(ios::fixed);
cout.precision(2);
i++;
else if(menu==2)
{
system("CLS");
cout.setf(ios::left);
cout<<"\n---------------------------------------------------------------------------"<<endl;
cout<<setw(30)<<"Customer Name"<<setw(30)<<"Customer's ID"<<setw(10)<<"Total Price(RM)"<<endl;
cout<<"---------------------------------------------------------------------------"<<endl;
for(i=0;i<user;i++)
{
cout<<setw(30)<<name[i]<<setw(30)<<ic[i]<<"RM"<<totalPrice[i]<<endl;
}
cout<<"---------------------------------------------------------------------------"<<endl;
}
else if(menu==3)
{
system("CLS");
cout<<"\n\t\t ===================================="<<endl;
cout<<"\t\t\tThank you for using our system!"<<endl;
cout<<"\t\t ===================================="<<endl;
return 0;
}
else
{
cout<<"Invalid option."<<endl;
}
}while(ans2=='Y'||ans2=='y');
int menuOption()
{
system("CLS");
cout<<"\n\t\t\tWELCOME TO SMART TRAVEL"<<endl;
cout<<"\t\t========================================="<<endl;
cout<<"\t\t||\t1. Choose package.\t\t||"<<endl;
cout<<"\t\t||\t2. Display list of customer.\t||"<<endl;
cout<<"\t\t||\t3. Exit program.\t\t||"<<endl;
cout<<"\t\t========================================="<<endl;
cout<<"\n\nPlease select the menu : ";
cin>>menu;
return menu;
else
{
strcpy (destination, "INVALID");
adult = 0.00;
children = 0.00;
}
else if (companyCode == 2)
{
strcpy (company, "MALINDO AIRLINES");
system("CLS");
cout << "-------------------------------------------------------------------------------------" << endl;
cout << "\nCODE\t\tDESTINATION\t\t\tACTIVITY" << endl;
cout << "\nA\t\tKOTA KINABALU\t\ti) Monsopiad Cultural Village" << endl;
cout << "\t\t\t\t\tii) OrangUtan Rehabilitation Centre" << endl;
cout << "\t\t\t\t\tiii) Rainforest Discovery Centre" << endl;
cout << "\t\t\t\t\tiv) Pulau Sipadan" << endl;
cout << "\t\t\t\t\tv) Poring Hotspring" << endl;
cout << "\nB\t\tKUCHING\t\t\ti) Taman Negara Bako" << endl;
cout << "\t\t\t\t\tii) Kampung Budaya Sarawak" << endl;
cout << "\t\t\t\t\tiii) Golden Bridge" << endl;
cout << "\t\t\t\t\tiv) Annah Rais Hotspring" << endl;
cout << "\t\t\t\t\tv) Permai Rainforest Resort" << endl;
cout << "\nC\t\tBRUNEI\t\t\ti) Hutan Simpan Labi" << endl;
cout << "\t\t\t\t\tii) Tasek Merimbun" << endl;
cout << "\t\t\t\t\tiii) Royal Regalia Building" << endl;
cout << "\t\t\t\t\tiv) Billionth Barrel Monument" << endl;
cout << "\t\t\t\t\tv) The Cement Wreck" << endl;
cout << "-------------------------------------------------------------------------------------" << endl;
else
{
strcpy (destination, "INVALID");
adult = 0.00;
children = 0.00;
}
else if (companyCode == 3 )
{
strcpy (company, "MALAYSIA AIRLINES");
system("CLS");
cout << "-------------------------------------------------------------------------------------" << endl;
cout << "\nCODE\t\tDESTINATION\t\t\tACTIVITY" << endl;
cout << "\nA\t\tSINGAPORE\t\ti) Gardens By The Bay" << endl;
cout << "\t\t\t\t\tii) Hawker Centre" << endl;
cout << "\t\t\t\t\tiii) Melion" << endl;
cout << "\t\t\t\t\tiv) Garden Rhapsody Show" << endl;
cout << "\t\t\t\t\tv) Universal Studio Singapore (USS)" << endl;
cout << "\nB\t\tHATYAI, THAILAND\ti) Pasar Terapung Klong Hae" << endl;
file:///C:/Users/asus/Desktop/CSC/Mini project/6/Group Project CSC.html 3/4
12/11/2019 Group Project CSC.html
cout << "\t\t\t\t\tii) Lanthen Festival" << endl;
cout << "\t\t\t\t\tiii) Magic Eye 3D Museum" << endl;
cout << "\t\t\t\t\tiv) Namtok Ton Nga Chang" << endl;
cout << "\t\t\t\t\tv) Greenway Night Market" << endl;
cout << "\nC\t\tBALI, INDONESIA\t\ti) Sacred Monkey Forest Sanctuary" << endl;
cout << "\t\t\t\t\tii) Ubud Palace" << endl;
cout << "\t\t\t\t\tiii) Seminyak Shopping" << endl;
cout << "\t\t\t\t\tiv) Rope-swing Ride" << endl;
cout << "\t\t\t\t\tv) Pura Tanah Lot" << endl;
cout << "-------------------------------------------------------------------------------------" << endl;
else
{
strcpy (destination, "INVALID");
adult = 0.00;
children = 0.00;
}
else
{
strcpy (company, "INVALID");
strcpy (destination, "INVALID");
destPrice=0;
return destPrice;
}
}