Question
The program will use a structure declared above main and defined in main. Need IPO and CODE CSE 112 Lab #2 Weather Program Accessing Structure
The program will use a structure declared above main and defined in main. Need IPO and CODE
CSE 112 Lab #2 Weather Program Accessing Structure Elements and IPOs
Complete an IPO and write a program for a meteorologist that calculates wind chill factor and cloud base altitude for inputs of temperature in Fahrenheit, wind speed in mph, and the dew point in Fahrenheit. The program will use a structure declared above main and defined in main.
Use the Program IPO & Requirements Decomposition template on Blackboard as a template for the IPO document.
The program must use four (4) functions and a structure in the solution: one function for getting input, one to compute the wind chill, one to compute the cloud base, and one for the output. The output will be formatted exactly as shown below with the introduction as shown and notes as appropriate. The program must pass the structure to the functions. Access the members of the structure using the dot operator. Store the results of the functions in the structure. Do not have the functions return the values.
The structure will contain:
Temperature - double
Wind speed - double
Dew point - double
Wind chill double
Cloud base - double
The equation for approximating the wind chill factor in North America is:
wc = 35.74 + 0.6215 Ta - 35.75V +0.16 + 0.4275 Ta V +0.16
Where Ta is the air temperature in Fahrenheit
V is the wind speed in mph (consider pow(windSpeed, 0.16))
Also, wind chill temperature is defined only at or below 10 C (50 F), and wind speeds above 4.8 kilometers per hour (3.0 mph). The program must check this and output *** when the wind chill cannot be computed (as shown below).
The cloud base in feet above ground level is determined by the spread which is the difference between the temperature and the dew point, and is calculated:
cloudBase = (temperature dew point) / 4.4 * 1000
If the cloud base is less than zero, set it to zero
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started