Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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