Question: Write a function called readRoomPrices. Retum Value: True ( if the hotel file was successfully read ) ; False ( if the file was not

Write a function called readRoomPrices.
Retum Value: True (if the hotel file was successfully read); False (if the file was not read)
Parameters:
An integer representing which hotel the user chose from the booking system menu
The name of the hotel
The price of 1 Queen
The price of 2 Queens
The price of 1 King
The price of 2 Kings
The price of a luxury suite for two
Description: This function will look at the user's hotel choice and determine which hotel file to open If the file cannot be opened, the function should retum false. Otherwise, the room prices should be read from the file, the hotel name chosen should get set, and the function should retum true.
There will be 3 data files called Embassy.txt, Hilton_Garden.txt, and DoubleTree.txt
Write a function called readRoomPrices. Retum

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 Programming Questions!