0% found this document useful (0 votes)
36 views21 pages

Final Report CSC128

This document appears to be a project report for a hotel booking website created by a group of students. It includes sections for the final report scoring rubric, presentation and system scoring rubric, table of contents, introduction, objectives, input/process/output analysis, program design, program testing, and complete coding. The program was designed to allow users to enter their details to book a hotel room, select room type and bed type, calculate the payment, and add optional packages to their booking. It provides sample input and output at each step and uses selection structures to direct the flow. The testing section shows examples of the program running with and without errors to validate its functionality.

Uploaded by

Jasmeen Emira
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)
36 views21 pages

Final Report CSC128

This document appears to be a project report for a hotel booking website created by a group of students. It includes sections for the final report scoring rubric, presentation and system scoring rubric, table of contents, introduction, objectives, input/process/output analysis, program design, program testing, and complete coding. The program was designed to allow users to enter their details to book a hotel room, select room type and bed type, calculate the payment, and add optional packages to their booking. It provides sample input and output at each step and uses selection structures to direct the flow. The testing section shows examples of the program running with and without errors to validate its functionality.

Uploaded by

Jasmeen Emira
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/ 21

UNIVERSITI TEKNOLOGI MARA CAWANGAN JOHOR

KAMPUS PASIR GUDANG

Jasmeen Emira
bt Nasarudin
CSC128
2022613048 Fundamentals of
Computer Problem
Solving

Ilya Bazilah bt Mohd

PROJECT REPORT
Mazlan
2022496764

Rania Nadhirah Binti


Safri
2022617428

Title
H HOTEL BOOKING WEBSITE
Lecturer
MUHAMAD SAIPUL FAKIR
Siti Noor Syuhada Group
Binti Azhari J4CEEM1102H
2022460034 Submission Date
16/7/2023
CSC128: FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
TOTAL MARKS – 100

1 2 3 4 5
Very Weak Weak Moderate Good Very Good

I. FINAL REPORT SCORING RUBRIC


Scale
Item Marks
1 2 3 4 5

1. Final Report format

2. Analysis – Input

3. Analysis – Process

4. Analysis – Output

5. Algorithm Readability

6. Algorithm Efficiency

7. Algorithm Logic

8. Problem Solving

9. Complexity of the Project

10. Final Report overall quality

TOTAL MARKS (50)


II. PRESENTATION AND SYSTEM SCORING RUBRIC
Scale
Item Marks
1 2 3 4 5

1. System Functionality
The system can solve the
assigned problem and output
should be as per the
specifications.

2. System Accuracy
The system should function
accurately for a long period of time.
Also, function correctly over all
ranges and combinations of data.

3. System User friendly


Easy to use with enough
information.

4. Implementation of
Programming Structures
- sequential
- selection
- repetition

5. Implementation of
Programming Structures
- function
- array

6. Implementation of
Programming Structures:
- input /output statements
- Process – calculation

7. Source code Readability


- The source code should be
simple and easy to understand.

8. Quality of Output
- menu
- layout creativity

9. Presentation
- Presentation Skills
- Organization

10. Overall effort to the project


- Work Responsibility
- Work Relation

TOTAL MARKS (50)

I (50) + II (50)

GROUP PROJECT MARKS (100%) – to be inserted in eRes


[PROPOSAL (50) + FINAL PROJECT (100)] / 150 X 100

GROUP PROJECT MARKS (20%)


GROUP PRIJECT MARJS (100%) / 100 X 20
TABLE OF CONTENT

BIL CONTENT PAGE


1 1.0 INTRODUCTION 1
2 2.0 OBJECTIVE 1
3 3.0 ANALYSIS OF INPUT, PROCESS AND 1-2
OUTPUT
4 4.0 PROGREM DESIGN 3-6
5 5.0 PROGRAM TESTING 7 - 11
6 6.0 COMPLETE CODING 12 - 17
1.0 INTRODUCTION

Physical booking might have a problem when there’s full of visitors coming at one
time, especially during holidays. This website could help the hotel management be
more systematic. Moreover, it could avoid any wrong calculations or putting data in
the system. Also, hotel reception could manage time more easily for visitors without
any difficulties

2.0 OBJECTIVE

1. To count the payment easily


2. To facilitate the website user

3.0 ANALYSIS OF INPUT, PROCESS AND OUTPUT

1. INPUT: Fullname

OUTPUT: Customer’s fullname

2. INPUT: Contact

OUTPUT: Customer’s contact number

3. INPUT: IC

OUTPUT: Customer’s I/C number

4. INPUT: Nights

OUTPUT: How long customer wants to stay

5. INPUT: Code

OUTPUT: Room type

1
6. INPUT: Bed/beds

PROCESS: Fullpay=nights*price
OUTPUT: Bed type
OUTPUT: Payment for room

7. INPUT: Choose (choice to buy add-on package)

OUTPUT: Yes or No

8. (*IF YES) INPUT: Add

OUTPUT: Package type


PROCESS: Sum=sum+fee
OUTPUT: Price for add-on package.

9. PROCESS: Total=fullpay+sum

OUTPUT: Total payment

2
4.0 PROGRAM DESIGN

START

READ fullname,
contact, ic, nights

READ code

T
DISPLAY “ROOM :
CASE == ‘S’
STANDARD ROOM”

T
DISPLAY “ROOM :
CASE == ‘P’ PREMIUM ROOM”
READ bed

T
DISPLAY “ROOM :
CASE == ‘V’ VIP ROOM”

DISPLAY “INVALID
CODE. PLEASE TRY
AGAIN.” 3

A
A

DISPLAY “BED : T
Price = 75.00 SINGLE BED” BED == “A1”

F
T
DISPLAY “BED :
Price = 85.00 BED == “B1”
DOUBLE BED”

DISPLAY “INVALID
CODE”

T
DISPLAY “BED :
Price = 100.00 BED == “C2”
DOUBLE BED”

T
DISPLAY “BED : BED == “D2”
Price = 150.00 QUEEN BED”

DISPLAY “INVALID
CODE”

Fullpay =
nights*price

A
4

B
T
B DISPLAY “BED :
Price = 250.00 BEDS == ‘E’ A
QUEEN BED”

T
DISPLAY “BED :
Price = 300.00 BEDS == ‘F’
KING BED”

DISPLAY “INVALID
CODE”

DISPLAY “Do you want


to add-on anything from
our package”

READ choose Choose == ‘n’

Choose ==
‘y’

READ add

Add == ‘B’ fee = 30.00

F
T

Add == ‘L’ fee = 70.00 5

F
T
Add == ‘D’
fee = 80.00

T
Add == ‘F’ fee = 20.00

DISPLAY “INVALID Choose ==


CODE” ‘y’

T
DISPLAY “Do you wish to
READ choose add more”

Choose == ‘n’

sum = sum + fee

Total = fullpay

DISPLAY fullname,
contact, ic, nights, code,
bed, fullpay, total

END 6
5.0 PROGRAM TESTING

1. Testing 1 – Complete testing without error

7
8
2. Testing 2 – The program will repeat until user enter the right code

9
10
3. Testing 3 – The program will repeat the add on table if the user enter yes

11
6.0 COMPLETE CODING
#include <iostream>
#include <cstring>
#include <cmath>

using namespace std;

float table(float fullpay);


void Greeting();
void Bye();

int main ()
{ //variable declaration
char fullname[40]="Jasmeen Emira", contact[20]=" ",ic[20]=" ",code,bed[20]=" ";
char beds=' ', choose=' ',answer=' ';
int nights, sum=0, result;
float price,ringgit[6]={75.00,85.00,100.00,150.00,250.00,300.00}, total=00.00, fullpay=00.00;

Greeting();//void function w/o parameter(func call)

//start personal information


//user need to enter their personal information
cout<<"\tFULLNAME : SIR/MISS ";
cin.getline(fullname,40);

cout<<"\tCONTACT NUMBER : ";


cin>>contact;

cout<<"\tI/C NUMBER : ";


cin>>ic;
//end personal information

cout<<"\tPlease Enter Other Number Besides '0'."<<endl;


cout<<"\tDURATION(nights)[example:2] : ";
cin>>nights;

//user choose type of room and bed they desire

cout<<"\t------------------------------------------------------------------------"<<endl;
cout<<"\t| CODE | PACKAGE ROOM | BED TYPE(CODE) | PRICE | DESCRIPTION |"<<endl;
cout<<"\t------------------------------------------------------------------------"<<endl;
cout<<"\t| S | STANDARD | SINGLE(A1) | RM 75.00 | FREE HAIR DYER|"<<endl;
cout<<"\t| | | DOUBLE(B1) | RM 85.00 | NO WIFI |"<<endl;
cout<<"\t------------------------------------------------------------------------"<<endl;
cout<<"\t| P | PREMIUM | DOUBLE(C2) | RM 100.00 | FREE HAIR DYER|"<<endl;
cout<<"\t| | | QUEEN (D2) | RM 150.00 | BATHTUB |"<<endl;
cout<<"\t| | | | | FREE WIFI |"<<endl;
cout<<"\t------------------------------------------------------------------------"<<endl;
cout<<"\t| V | VIP | QUEEN(E) | RM 250.00 | PRIVATE FLOOR |"<<endl;
cout<<"\t| | | KING (F) | RM 300.00 | FREE FACILITY |"<<endl;
cout<<"\t| | | | | JACUZZI TUB |"<<endl;
cout<<"\t| | | | | FOODS DELIVERY|"<<endl;
cout<<"\t------------------------------------------------------------------------"<<endl;
cout<<"\t[DISCLAIMER! ENTER RIGHT CODE!]"<<endl;
cout<<"\tDESIRED ROOM(CODE) : ";
cin>>code;

switch (code)//start switch...case for room


{
{//standard room
case 'S':
case 's':
cout<<"\tROOM : STANDARD ROOM "<<endl;
cout<<"\tBED TYPE(CODE) : ";
cin>>bed;
if (strcmp(bed, "A1")== 0 || strcmp(bed, "a1")== 0) //nested selection if..else for
bed using string compare for standard room
{
cout<<"\tBED : SINGLE BED "<<endl;
price=ringgit[0];
cout<<"\tROOM PRICE(1 day) : RM "<<price<<endl;
fullpay=price*nights;
cout<<"\tTOTAL PRICE :RM "<<fullpay<<endl;
result=table(fullpay);//return function w parameters (function call)

12
total=result;
//reciept

cout<<"\t==============================================================================================
==========="<<endl;
cout<<"\t-----------------------------------------------RECIEPT---------------------------------------
------------"<<endl;
cout<<"\tFULLNAME : SIR/MISS "<<fullname<<endl;
cout<<"\tCONTACT NUMBER : "<<contact<<endl;
cout<<"\tI/C NUMBER : "<<ic<<endl;
cout<<"\tDURATION(nights) : "<<nights<<endl;
cout<<"\tROOM : "<<code<<endl;
cout<<"\tBED TYPE : "<<bed<<endl;
cout<<"\tROOM PRICE : RM "<<fullpay<<endl;
cout<<"\tFULL PAYMENT(include add-on price) : RM "<<total<<endl;
cout<<"\t----------------------------------------------------------------------------------------------
-----------"<<endl;

Bye();//void func w/o parameter


}
else if (strcmp(bed, "B1")== 0 || strcmp(bed, "b1")== 0)
{
cout<<"\tBED : DOUBLE BED "<<endl;
price=ringgit[1];
cout<<"\tROOM PRICE(1 day) : RM "<<price<<endl;
fullpay=price*nights;
cout<<"\tTOTAL PRICE :RM "<<fullpay<<endl;
result=table(fullpay);//return function w parameters (function call)
total=result;
//reciept

cout<<"\t==============================================================================================
==========="<<endl;
cout<<"\t-----------------------------------------------RECIEPT----------------------------------------
-----------"<<endl;
cout<<"\tFULLNAME : SIR/MISS "<<fullname<<endl;
cout<<"\tCONTACT NUMBER : "<<contact<<endl;
cout<<"\tI/C NUMBER : "<<ic<<endl;
cout<<"\tDURATION(nights) : "<<nights<<endl;
cout<<"\tROOM : "<<code<<endl;
cout<<"\tBED TYPE : "<<bed<<endl;
cout<<"\tROOM PRICE : RM "<<fullpay<<endl;
cout<<"\tFULL PAYMENT(include add-on price) : RM "<<total<<endl;
cout<<"\t----------------------------------------------------------------------------------------------
-----------"<<endl;

Bye();//void func w/o parameter

}
else
cout<<"\tINVALID CODE."<<endl;//end nested selection if..else for bed using
string compare for standard room
}
break;//end standard room
{//premium room
case 'P':
case 'p':
cout<<"\tROOM : PREMIUM ROOM"<<endl;
cout<<"\tBED TYPE : ";
cin>>bed;
if (strcmp(bed, "C2")== 0 || strcmp(bed, "c2")== 0)//nested selection if...else for
bed using string compare for premium room
{
cout<<"\tBED : DOUBLE BED"<<endl;
price=ringgit[2];
cout<<"\tROOM PRICE(1 day) : RM "<<price<<endl;
fullpay=price*nights;
cout<<"\tTOTAL PRICE :RM "<<fullpay<<endl;
result=table(fullpay);//return function w parameters (function call)
total=result;
//reciept

cout<<"\t==============================================================================================
==========="<<endl;
cout<<"\t-----------------------------------------------RECIEPT----------------------------------------
-----------"<<endl;
cout<<"\tFULLNAME : SIR/MISS "<<fullname<<endl;
cout<<"\tCONTACT NUMBER : "<<contact<<endl;
cout<<"\tI/C NUMBER : "<<ic<<endl;

13
cout<<"\tDURATION(nights) : "<<nights<<endl;
cout<<"\tROOM : "<<code<<endl;
cout<<"\tBED TYPE : "<<bed<<endl;
cout<<"\tROOM PRICE : RM "<<fullpay<<endl;
cout<<"\tFULL PAYMENT(include add-on price) : RM "<<total<<endl;
cout<<"\t----------------------------------------------------------------------------------------------
-----------"<<endl;

Bye();//void func w/o parameter

}
else if (strcmp(bed, "D2")== 0 || strcmp(bed, "d2")== 0)
{
cout<<"\tBED : QUEEN ROOM"<<endl;
price=ringgit[3];
cout<<"\tROOM PRICE(1 day) : RM "<<price<<endl;
fullpay=price*nights;
cout<<"\tTOTAL PRICE :RM "<<fullpay<<endl;
result=table(fullpay);//return function w parameters (function call)
total=result;
//reciept

cout<<"\t==============================================================================================
==========="<<endl;
cout<<"\t-----------------------------------------------RECIEPT----------------------------------------
-----------"<<endl;
cout<<"\tFULLNAME : SIR/MISS "<<fullname<<endl;
cout<<"\tCONTACT NUMBER : "<<contact<<endl;
cout<<"\tI/C NUMBER : "<<ic<<endl;
cout<<"\tDURATION(nights) : "<<nights<<endl;
cout<<"\tROOM : "<<code<<endl;
cout<<"\tBED TYPE : "<<bed<<endl;
cout<<"\tROOM PRICE : RM "<<fullpay<<endl;
cout<<"\tFULL PAYMENT(include add-on price) : RM "<<total<<endl;
cout<<"\t----------------------------------------------------------------------------------------------
-----------"<<endl;

Bye();//void func w/o parameter

}
else
cout<<"\tINVALID CODE."<<endl;//end nested selection if...else for bed using
string compare for premium room
}
break;//end premium room
{//vip room
case 'V':
case 'v':
cout<<"\tROOM : VIP ROOM"<<endl;//nested selection no.3
cout<<"\tBED TYPE :";
cin>>beds;
if (beds == 'E' || beds == 'e') //nested selection if...else for bed using
string compare for vip room
{
cout<<"\tBED : QUEEN BED"<<endl;
price=ringgit[4];
cout<<"\tROOM PRICE(1 day) : RM "<<price<<endl;
fullpay=price*nights;
cout<<"\tTOTAL PRICE :RM "<<fullpay<<endl;
result=table(fullpay);//return function w parameters (function call)
total=result;
//reciept

cout<<"\t==============================================================================================
==========="<<endl;
cout<<"\t-----------------------------------------------RECIEPT----------------------------------------
-----------"<<endl;
cout<<"\tFULLNAME : SIR/MISS "<<fullname<<endl;
cout<<"\tCONTACT NUMBER : "<<contact<<endl;
cout<<"\tI/C NUMBER : "<<ic<<endl;
cout<<"\tDURATION(nights) : "<<nights<<endl;
cout<<"\tROOM : "<<code<<endl;
cout<<"\tBED TYPE : "<<beds<<endl;
cout<<"\tROOM PRICE : RM "<<fullpay<<endl;
cout<<"\tFULL PAYMENT(include add-on price) : RM "<<total<<endl;
cout<<"\t----------------------------------------------------------------------------------------------
-----------"<<endl;

Bye();//void func w/o parameter

14
}
else if (beds == 'F' || beds == 'f')
{
cout<<"\tBED : KING BED"<<endl;
price=ringgit[5];
cout<<"\tROOM PRICE(1 day) : RM "<<price<<endl;
fullpay=price*nights;//kira1
cout<<"\tTOTAL PRICE :RM "<<fullpay<<endl;
result=table(fullpay);//return function w parameters (function call)
total=result;
//reciept

cout<<"\t==============================================================================================
==========="<<endl;
cout<<"\t-----------------------------------------------RECIEPT----------------------------------------
-----------"<<endl;
cout<<"\tFULLNAME : SIR/MISS "<<fullname<<endl;
cout<<"\tCONTACT NUMBER : "<<contact<<endl;
cout<<"\tI/C NUMBER : "<<ic<<endl;
cout<<"\tDURATION(nights) : "<<nights<<endl;
cout<<"\tROOM : "<<code<<endl;
cout<<"\tBED TYPE : "<<beds<<endl;
cout<<"\tROOM PRICE : RM "<<fullpay<<endl;
cout<<"\tFULL PAYMENT(include add-on price) : RM "<<total<<endl;
cout<<"\t------------------------------------------------------------------------------
---------------------------"<<endl;

Bye();//void func w/o parameter

}
else
cout<<"\tINVALID CODE."<<endl;//end nested selection if...else for bed using
string compare for vip room
}
break;//end vip room
default:
cout<<"\tINVALID CODE. PLEASE TRY AGAIN."<<endl;
}//end switch...case for room

return 0;
}

float table(float fullpay)//start return function w parameters (function definition)


{
char choose=' ', add=' ';
float sum=0, fee,rm[4]={30.00,70.00,80.00,20.00};

cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| CODE | ADD-ON | PRICE | DESCRIPTION | DESCRIPTION |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| B | BREAKFAST | 30.00 | NASI LEMAK | |"<<endl;
cout<<"\t| | | | CEREAL | |"<<endl;
cout<<"\t| | | | COFFEE | |"<<endl;
cout<<"\t| | | | TOAST | PER FAMILY |"<<endl;
cout<<"\t| | | | FRIED RICE | |"<<endl;
cout<<"\t| | | | TEA | |"<<endl;
cout<<"\t| | | | MILK | |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| L | LUNCH | 70.00 | NASI MINYAK | |"<<endl;
cout<<"\t| | | | NASI TOMATO | |"<<endl;
cout<<"\t| | | | NASI ARAB | |"<<endl;
cout<<"\t| | | | NASI KERABU | PER FAMILY |"<<endl;
cout<<"\t| | | | ORANGE JUICE| |"<<endl;
cout<<"\t| | | | SYRUP | |"<<endl;
cout<<"\t| | | | HOT MILK TEA| |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| D | DINNER | 80.00 | SPAGHETTI | |"<<endl;
cout<<"\t| | | | WESTERN FOOD| |"<<endl;
cout<<"\t| | | | SATAY | PER FAMILY |"<<endl;

15
cout<<"\t| | | | PORRIDGE | |"<<endl;
cout<<"\t| | | | ANY WATER | |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| F | FACILITY | 20.00 | GYM | |"<<endl;
cout<<"\t| | | | POOL | NON VIP |"<<endl;
cout<<"\t| | | | SPA | |"<<endl;
cout<<"\t| | | | FOOD DELIVERY| |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\tDo you want to add-on anything from our package?"<<endl;
cout<<"\tEnter Y as YES and ANY ALPHABET as NO : ";
cin>>choose;

do
{//loop do while
if (choose=='Y'|| choose=='y')//selection for add-on
{
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| CODE | ADD-ON | PRICE | DESCRIPTION | DESCRIPTION |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| B | BREAKFAST | 30.00 | NASI LEMAK | |"<<endl;
cout<<"\t| | | | CEREAL | |"<<endl;
cout<<"\t| | | | COFFEE | |"<<endl;
cout<<"\t| | | | TOAST | PER FAMILY |"<<endl;
cout<<"\t| | | | FRIED RICE | |"<<endl;
cout<<"\t| | | | TEA | |"<<endl;
cout<<"\t| | | | MILK | |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| L | LUNCH | 70.00 | NASI MINYAK | |"<<endl;
cout<<"\t| | | | NASI TOMATO | |"<<endl;
cout<<"\t| | | | NASI ARAB | |"<<endl;
cout<<"\t| | | | NASI KERABU | PER FAMILY |"<<endl;
cout<<"\t| | | | ORANGE JUICE| |"<<endl;
cout<<"\t| | | | SYRUP | |"<<endl;
cout<<"\t| | | | HOT MILK TEA| |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| D | DINNER | 80.00 | SPAGHETTI | |"<<endl;
cout<<"\t| | | | WESTERN FOOD| |"<<endl;
cout<<"\t| | | | SATAY | PER FAMILY |"<<endl;
cout<<"\t| | | | PORRIDGE | |"<<endl;
cout<<"\t| | | | ANY WATER | |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;
cout<<"\t| F | FACILITY | 20.00 | GYM | |"<<endl;
cout<<"\t| | | | POOL | NON VIP |"<<endl;
cout<<"\t| | | | SPA | |"<<endl;
cout<<"\t| | | | FOOD DELIVERY| |"<<endl;
cout<<"\t--------------------------------------------------------------------"<<endl;

cout<<"\tADD-ON(CODE) : ";
cin>>add;
{
if (add == 'B' || add == 'b')//start nested selection if
{
cout<<"\tADD-ON : BREAKFAST"<<endl;
fee=rm[0];
cout<<"\tPRICE : RM "<<fee<<endl;
cout<<"\tDo you wish to add more?"<<endl;
cout<<"\tY as YES and ANY ALPHABET as NO : ";
cin>>choose;
sum+=fee;
cout<<"\tADD-ON PRICE : RM "<<sum<<endl;//price for add-on
}
else if (add == 'L' || add == 'l')
{
cout<<"\tADD-ON : LUNCH"<<endl;
fee=rm[1];
cout<<"\tPRICE : RM "<<fee<<endl;
cout<<"\tDo you wish to add more?"<<endl;
cout<<"\tY as YES and ANY ALPHABET as NO : ";
cin>>choose;
sum+=fee;
cout<<"\tADD-ON PRICE : RM "<<sum<<endl;//price for add-on
}
else if (add == 'D' || add == 'd')
{
cout<<"\tADD-ON : DINNER"<<endl;
fee=rm[2];
cout<<"\tPRICE : RM "<<fee<<endl;
cout<<"\tDo you wish to add more?"<<endl;
cout<<"\tY as YES and ANY ALPHABET as NO : ";

16
cin>>choose;
sum+=fee;
cout<<"\tADD-ON PRICE : RM "<<sum<<endl;//price for add-on
}
else if (add == 'F' || add == 'f')
{
cout<<"\tADD-ON : FACILITY"<<endl;
fee=rm[3];
cout<<"\tPRICE : RM "<<fee<<endl;
cout<<"\tDo you wish to add more?"<<endl;
cout<<"\tY as YES and ANY ALPHABET as NO : ";
cin>>choose;
sum+=fee;
cout<<"\tADD-ON PRICE : RM "<<sum<<endl;//price for add-on
}
else
cout<<"\tINVALID CODE.TRY AGAIN."<<endl;
} //end nested selection if
}
else
cout<<"\tPRICE : RM 0"<<endl;

}
while (choose== 'Y' || choose=='y');//end loop do while

return sum + fullpay;


}//end return func w parameters

void Greeting()//start void func w/o parameter


{
cout<<"\t=====================================================================================
================"<<endl;
cout<<"\t|-------------------------HELLO! WELCOME TO H HOTEL BOOKING WEBSITE!-----------------
---------------|"<<endl;
cout<<"\t=====================================================================================
================"<<endl;
}//end void func w/o parameter

void Bye()//start void func w/o parameter


{
cout<<"\t===================================THANK YOU FOR CHOOSING OUR
HOTEL!====================================="<<endl;
cout<<"\t============================================SEE YOU
LATER!==============================================="<<endl;
}//end void func w/o parameter

17

You might also like