Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

CSE 110 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.

Grading will include points off for failure to follow programming standards and Lab requirements that are not met. Test Input data create a text file with the data below named weatherData.txt and test against the output shown above using this data. The input data order is temperature, wind speed, dew point. CSE 110

Introduction to Computer Science I 6 6 0 22 6 2 9.1 6 6 35 7 12 56 5 45 38 3 16 43 6 40 47 6 34 10 6 7 56 4 36 15 7 9 -99 -99 -99

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

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions

Question

Decide on the right degree of formality

Answered: 1 week ago

Question

5. Discuss the key components of behavior modeling training.

Answered: 1 week ago