Create a class named weatherreport

Assignment Help Basic Computer Science
Reference no: EM131396101

Create a class named WeatherReport that holds a daily weather report with data members such as dayOfMonth, highTemp, lowTemp, amountRain, and amountSnow. The constructor initializes the fields with default values: 99 for dayOfMonth, -9999 for highTemp, 9999 for lowTemp, and 0 for amountRain and amountSnow. Include a function that prompts the user and sets values for each field so that you can override the default values. Instantiate 30 WeatherReport objects and, in a loop, prompt the user for a month's data.

At the end of the month, a month-end WeatherReport object is created. Initialize the object with default values; then use a friend function to store the high temperature, low temperature, and rain and snow totals for the month in the object. The friend function takes two WeatherReport objects-the summary object and one day's object-and it returns an updated summary object. If the day's high temperature is higher than the summary object's high, then replace the summary high. If the day's low temperature is lower than the summary object's low, then replace the summary low. Accumulate rain and snow in the summary object. Write a main()function that creates a month-end weather report from the 30 daily reports. Save the file as WeatherReport.cpp.

Reference no: EM131396101

Calculating the amount of gasoline consumed

The DOT might sample a group of commuters and collect information on the number of miles driven per day, number of driving days per month, and the fuel economy of their cars

Balancing function and fashion

Error messages are a key part of an overall interface design strategy of guidance for the user. Discuss strategies to ensure integrated, coordinated error messages that are

Analyze faster processor chip result increase in performance

Analyze the following statement: "Using the faster processor chip results in corresponding increase in performance of a computer even if main memory speed remains same."

Create a swimlane document flowchart

Create a swimlane document flowchart for the following Fitter Snacker sales process. Use the swimlanes of Customer, Sales, Manufacturing, and Procurement.Here is a descr

Value of a car is a linear function of time

Assume the value of a car is a linear function of time.  When new the car is worth $26,300; 20 years later the car is worth $1,500.  How much will the car be worth 7 years a

Information that is widely available on the web

What are the benefits of using search engines, such as Google, Yahoo!, or Bing? What are some of the limitations and dangers of using information that is widely available on

Balanced scorecard of performance measures

Identify four categories of measures that might constitute a Balanced Scorecard of performance measures and provide an example of each. Also explain how a Balanced Scorecard

Identify and discuss the technologies that have gone

Identify and discuss the technologies that have gone from analog to digital. What was the reasoning for each conversion? Include a question that responding students can r

Reviews

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd