Question: 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 months with the highest amount of rain
The months 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:
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:
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:
Enter your choice
A Add a month of statistics
E Edit a month of statistics
P Print report
Q Quit
Choice: P
Total Rainfall: inches
Average Rainfall: inches
Most Rainfall: Jan had inches
Least Rainfall: Feb had 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 would appreciate any help and I would greatly appreciate comments. I know that this question has been posted previously but none of the answers have practical or working code to learn from. I would greatly appreciate assistance on this.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
