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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started