Answered step by step
Verified Expert Solution
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 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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started