Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE Weather Program PROJECT #1 File handling, Loops, and meeting requirements Start a new project or Modify Lab #5, which calculated the wind chill factor

CSE Weather Program PROJECT #1 File handling, Loops, and meeting requirements Start a new project or Modify Lab #5, which calculated the wind chill factor and cloud base altitude using temperature, wind speed, and the dew point, to read the input values from a file called weatherData.txt.

The program will read a set of values, compute the results, and write the results to a file called yourName.txt and display them on the output console.

The data sentinel in the file is -99. The program must have at least four (4) functions: one for opening the files with file failure conditions, one to compute the wind chill, one to compute the cloud base, and at least one for the output.

Consider other functions as you see fit. The loop should be in main.

Create the input file (data on next page) weatherData.txt

The input and output streams must be declared in main and passed as needed.

The program must read the data from the data file weatherData.txt.

There should be a loop in main that reads, computes, and outputs the values until the sentinel is read. It should also capture the fact that invalid data was read to output the error message.

The program must produce the required output to the console window and to a file.

The output must be as shown in the screen capture below (notice the extra note shown).

The error message is only output if data producing an invalid wind chill was read

Main will close both files before returning zero, and shall not have any output statements.

The equations for the wind chill factor and computing cloud base are in the Lab #5 instructions. Note: When the input does not produce a valid wind chill value, the program will need to retain this information to output the required text. Output Formatting for the display and output file are to be exactly as shown below

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago