Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C + + , Visual Studio. Create a class to hold Rainfall Statistics. This class will be a LinkedList. The program will ask the user

C++, Visual Studio. Create a class to hold Rainfall Statistics. This class will be a LinkedList.
The program will ask the user to enter the number of months to be saved. Your driver program will show the following menu items:
A -- Add a month of statistics
E -- Edit a month of statistics
P -- Print report
Q -- Quit
The A option will prompt a user to enter a month and the amount of rainfall during the month.
The E option will prompt a user to override the amount of rainfall for a given month (also supplied by the user).
The P option will print a report with the following information:
Total amount of rain
The average amount of rain
The month(s) with the highest amount of rain
The month(s) with the lowest amount of rain
An example run would be:
Enter your choice
A -- Add a month of statistics
E -- Edit a month of statistics
P -- Print report
Q -- Quit
Choice: A
Enter Month: Jan
Enter Rainfall (in Inches): 42
Enter your choice
A -- Add a month of statistics
E -- Edit a month of statistics
P -- Print report
Q -- Quit
Choice: A
Enter Month: Feb
Enter Rainfall (In Inches): 23
Enter your choice
A -- Add a month of statistics
E -- Edit a month of statistics
P -- Print report
Q -- Quit
Choice: E
Enter Month: Mar
ERROR: Invalid Month
Enter Month: Feb
Enter Rainfall (In Inches): 24
Enter your choice
A -- Add a month of statistics
E -- Edit a month of statistics
P -- Print report
Q -- Quit
Choice: P
Total Rainfall: 66 inches
Average Rainfall: 33 inches
Most Rainfall: Jan had 42 inches
Least Rainfall: Feb had 24 inches
Enter your choice
A -- Add a month of statistics
E -- Edit a month of statistics
P -- Print report
Q -- Quit
Choice: Q
The program will have the following:
Driver.cpp -- Contains the main and any unique subroutines.
Rainfall.h -- Contains the header information for the Rainfall class
Rainfall.cpp -- Contains the implementation of the Rainfall class
List.h -- Contains the header information for your linked list class.
List.cpp -- Contains the implementation
Implement:
ListInterface.h
Node.h
PrecondViolatedExcept.h
LinkedList.h I know this question has been posted before and I made a previous post about it but none of the solutions have worked for me. The program MUST contain a Rainfall.h, a Rainfall.cpp, a List.h, a List.cpp, and a Driver.cpp. These five files must implement ListInterface.h, Node.h, PrecondViolatedExcept.h, and a LinkedList.h. I would really apreciate a practical code of this to learn off of and I would greatly appreciate comments.

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago