Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write code in C++ language without using a break statement. CSE 110-weather Program PROJECT #I-File handling, Loops, and meeting requirements Start a new project or

Write code in C++ language without using a break statement.image text in transcribed

CSE 110-weather Program PROJECT #I-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 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 needec 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 end. 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 Output Formatting for the display and output file are to be exactly as shown below 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 below the data The input file data order is temperature, wind speed, dew point. Grading will include points off for failure to follow programming standards and Lab requirements that are not met. EABCCFall 20181CSE 110 104 Labs using grossPay Lab 1234 Project 1 Weath. roject #1 - Weather Data Program Temperature lind Speed Dew Point ind Chill Cloud Base 6.0 dF 22.0 dF 9.1 dF 35.0 dF 56.0 dF 38.0 dF 43.0 dF 47.0 dF 10.0 dF 56.0 dF 15.0 dF 6.0 mph 6.0 mph 6.0 mph 7.0 mph 5.0 mph 3.0 mph 6.0 mph 6.0 mph 6.0 mph 4.0 mph 7.0 mph 0.0 dF 2.0 dF 6.0 dF 12.0 dF 45.0 dF 16.0 dF 46.0 dF 34.0 dF 7.0 dF 36.0 dF 9.0 dF 4.7 dF 14.3 dF 1.0 dF 29.1 dF 1363.6 ft 4545.5 ft 704.5 ft 5227.3 ft 2500.0 ft 5000.0 ft 681.8 ft 2954.5 ft 681.8 ft 4545.5 ft 1363.6 ft 39.3 dF 44.1 dF 0.0 dF 5.0 dF xx There is no wind chil1 factor at this temperature or wind speed. Kxx Temperature nust be 50 degrees or less, and wind speed nust be 3 mph to compute wind chill Process returned (0x0) execution time : 0.047 s Press any key to continue

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago