Question: After completing the Programming Challenge 5 - 9 in the book, create 5 - 9 m by modifying the original 5 - 9 to use
After completing the Programming Challenge in the book, create by modifying the original to use a file named Occupancy.txt as input.
a The first line and field on the file is the floor count.
b Subsequent lines contain the number of rooms and rooms occupied counts.
c This file should be copied into the same folder as the cpp file in your solution folder.
All outputs to the screen should be mirrored to an output file named HotelReport.txt
a This file will be found in the same folder as the mcpp file in your solution folder.
For failed validations, issue a message to describe the validation error and
a Return with return code if file fails to open
i This is written as: return ;
b Return with return code if fail to read number of floors eg empty file
c Return with return code of number of floors is invalid
d For floor related validations, issue a continue statement to skip further processing for that floor.
You may expect that the input file has the two input counts for each floor.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
