Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

dy dx Find the derivative of the function y=(4x+3)5(2x+1)2.

Answered: 1 week ago

Question

Draw and explain the operation of LVDT for pressure measurement

Answered: 1 week ago