Answered step by step
Verified Expert Solution
Link Copied!

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 5-9 in the book, create 5-9m by modifying the original 5-9 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 5-9m.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 5-9m.cpp file in your solution folder.
For failed validations, issue a message to describe the validation error and
a. Return with return code 10 if file fails to open
i. This is written as: return 10;
b. Return with return code 12 if fail to read number of floors (e.g. empty file).
c. Return with return code 14 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.
image text in transcribed

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions