Question: This is the coding for lab 2 so please modify it for it to work for lab 4. Lab 2 Coding (just for reference!!) #include

This is the coding for lab 2 so please modify it for it to work for lab 4.

Lab 2 Coding (just for reference!!)

#include #include #include using namespace std; struct equation { double temp,wspeed,dew,wchill,cbase; }; void input(equation &e) { cout>e.temp; cout>e.wspeed; cout>e.dew; } void windchill(equation &e) { if(e.temp > 50 || e.wspeed  

THIS IS WHAT I NEED!!!!

This is the coding for lab 2 so please modify it for

CSE 112-Lab #4 weather Program-Array of Structures and File I/O) Convert Lab #2 (weather program) to read multiple values of input data from a file called weatherData.txt and store it in an array of structures. The program will process the data, and display the results and write the results to a file called yourName.txt. Main should only have stream declarations and limited variable declarations and function calls Requirements: The program will use an array of structures for the solution, and functions for input and output (at a minimum) The input file could have up to 20 sets of data, but it could be less. The program will handle this fact. The program must populate the array of structures The array of structures must be passed to the input and output functions The program will handle file failure conditions and close the files when finished The program will read the data from the data file "weatherData.txt" The program will produce the output to the console window and to a file "yourName.txt" The file streams cannot be declared global and must be passed as stream objects to the functions that need them. (page 673) Output Formatting for display and file writing The output header will appear only once as shown below The output data in the columns will be right aligned with the units and one decimal place 1. 2. 3. The output when wind chill cannot be computed shall be "*** 4. The "invalid input" text should appear only once as shown when needed Sample Screen Capture. The file output should be the same Temperature Wind Speed Dew Point Wind Chill Cloud Base 6.0 dF 65.0 dF 27.0 dF 35.0 dF 10.0 dF 48.0 dF 43.0 dF 47.0 dF 48.0 dF 12.0 dF 88.0 dF 9.1 dF 6.0 mph 18.0 mplh 8.0 mph 7.0 mph 6.0 mph 2.0 mph 6.0 mph 6.0 mph 1.0 mph 4.0 mph 3.0 mph 6.0 mph 0.0 dF 47.0 dF 5.0 dF 12.0 dF 7.0 dF 23.0 dF 40.0 dF 34.0 dF 35.0 dF 11.0 dF 82.0 dF 6.0 dF -4.7 dF 1363.6 ft 4090.9 ft 5000.0 ft 5227.3 ft 681.8 ft 5681.8 ft 681.8 ft 2954.5 ft 2954.5 ft 227.3 ft 1363.6 ft 704.5 ft 18.8 dF 29.1 dF 0.0 dF 39.3 dF 44.1 dF 5.0 dF xxx Temperature must be 50 degrees or less, and windspeed must be 3 mph to compute wind chill

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!