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

Questions Cloud

Exchange rate effects on industry : Using shifts in supply and demand curves, describe how a change in the exchange rate affected your industry. Label the axes, and state the geographic, product, and time dimensions of the demand and supply curves you are drawing.
How given results help in deciding about 12 disputed papers : In each passage they counted the frequency of certain words. The results for the word by are shown in the table. Is by used with significantly different frequency by the two writers? Explain how these results help in deciding about the 12 disputed..
Predict the impact on profitability in both situations : Compare the primary costs involved in cleaning up the water immediately (and thus confessing)versus hiding your culpability now and possibly paying more in the future. Predict the impact on profitability in both situations.
Derive the correlations : Derive the correlations between P* and Y, and Q* and Y. Discuss their signs. (Quantitative methods in Economics)
Create a class named weatherreport : 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.
Derive the implicit function rule : Derive the implicit function rule. (Quantitative methods in Economics)
Is given problem one of independence or of goodness of fit : Is by used with significantly different frequency by the two writers? Explain how these results help in deciding about the 12 disputed papers.
Create a friend function that displays a customer number : Create a friend function that displays a customer number and the customer's city, state, and zip code. Write a brief main()function to test the classes and friend function. Save the file as Customer.cpp
Started a printing business in duluth : Penelope has recently started a printing business in Duluth. She had to pay a fee to obtain a trade license from the Minnesota government and took a loan from the local bank to purchase inkjet printers, laser printers, and screen printers.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Create a database named wpc-ch10-pq in sql server

Create a database named WPC-CH10-PQ in SQL Server 2008 R2. Use the default settings for file sizes, names, and locations.

  Sketch a proof that it can be simulated by a standard tm

Figure 5.14 shows a representation of a Turing machine with a two-dimensional tape whose head can move one step vertically or horizontally. Give a complete definition of a two-dimensional TM and sketch a proof that it can be simulated by a standar..

  Create an n by m array

Create an n by m array (n, m input by user). Initialize all cells in array to 0. The bug starts at cell 1,1. The bug can jump from its cell to any neighboring cell (left, right, up, down, diagonal) -- so there are at most 8 neighboring cells. Thou..

  Write a description based on the 5-number summary

Super Bowl wins. In the Super Bowl, by how many points does the winning team outscore the losers? Here are the winning margins for the first 43 Super Bowl games: 25, 19, 9, 16, 3, 21, 7, 17, 10, 4, 18, 17, 4, 12, 17, 5, 10, 29, 22, 36, 19, 32, 4, ..

  Determine the amounts of reflected and absorbed energies

Determine the net radiation heat transfer rate for each surface. Which surface experiences the highest amount of radiation heating?

  Challenges of securing information

Create a 7-10-slide PowerPoint Presentation on the challenges of securing information, and list some of today's information security attacks. You may use various sources (scholarly). Be sure to cite any sources used in a reference slide with prope..

  What does use case mean

Q1)- What is the relationship between level 0 and level 1 DFD diagrams? Explain. Q2)- What does Use Case mean? and what does use case describe?

  Explaining the available bandwidth as function of n

Assuming average packet size is 5 slot times, expreess the available bandwidth as a function of N?

  What is investigative reporting

What is investigative reporting? How is it relevant to white collar crime? Why or why not is it helpful in fighting white collar crime?

  Write select statement determines paymentdate column invoice

Write a Select statement that determines whether the PaymentDate column of The Invoices table has any invalid values.

  Creating new information technology systems for a company

Communication - key; the more they know, the less likely there will be opposition or opposition will be mitigated; email, reports, meetings

  How to make circumstances easier to design and implement

Do you think that a database would make a design more complex to implement or make your circumstances easier to design and implement? Databases by nature reduce data redundancy which improves data integrity enabling you to reduce coding since you..

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