Question: Write a C++ program that contain the following functions: a) Function travelCharge(char,int,int): this function will calculate and return the traveling cost based on the given

Write a C++ program that contain the following

functions:

a) Function travelCharge(char,int,int): this function will calculate and return the traveling

cost based on the given table.

Vacation Places Places ID Adult (RM) Children (RM)

Pangkor Island P 350 175

Bukit Merah B 200 100

Teluk Batik T 80 40

b) Function hotelCharge(int,int): this function will receives vacation packages as input

from the user. Then, calculate and return the hotel charge. The hotel charge (per room) is

based on the given table.

Vacation Packages Package ID Price per day and per room (RM)

Deluxe D 430

Standard S 270

Economy E 100

c) Write the main program to input the customers name, vacation places (P, B or T), number

of adults in the group, number of children in the group, number of days going for vacation

and number of hotel rooms booked. Then, by using functions above, calculate the cost for

travel and hotel. Finally, display the total payment a customer has to pay.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!