Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++, Please divide the program into weather.h file, weather.cpp and main.cpp. Solve the programming Challenge 4, Weather Statistics, Page# 659. Modify this problem by

In c++, Please divide the program into weather.h file, weather.cpp and main.cpp.

image text in transcribed

image text in transcribed

image text in transcribed

Solve the programming Challenge 4, Weather Statistics", Page# 659. Modify this problem by writing a class named Weather. Member variables: Total Rainfall, High Temperature, Low Temperature A default constructor with default value ZERO, and a constructor with three parameters A default destructor All member functions User input is not required, instead read data from a file, weather.txt (check next page). . Weather Statistics Write a program that uses a structure to store the following weather data for a par- ticular month: Total Rainfall High Temperature Low Temperature Average Temperature The program should have an array of 12 structures to hold weather data for an entire year. When the program runs, it should ask the user to enter data for each month. (The average temperature should be calculated.) Once the data are entered for all the Structured Data months, the program should calculate and display the average monthly rainfall, the total rainfall for the year, the highest and lowest temperatures for the year (and the months they occurred in), and the average of all the monthly average temperatures. Input Validation: Only accept temperatures within the range between -100 and +140 degrees Fahrenheit. Month High Temp (C) Low Temp (C) Avg Rain (mm): Jan 9.2 -46.4 43.4 Feb 5.6 -42.6 3.3 Mar 8.8 -39.6 2.7 Apr 16.4 -25.6 5.2 May 27.5 -6.7 35 Jun 31.3 -1.8 26.4 Jul 30.9 -0.3 65.6 Aug 31.6 -2 33.8 Sep 25.1 -7.7 23.2 Oct 18.6 -21.4 27.9 Nov 3.6 -12.7 0 Dec 10.3 -42.7 0

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_2

Step: 3

blur-text-image_3

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

Cameron Herrin case What is the lesson for the class from the case?

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago