CIS 260 Computer Programming I

Program Requirements: Rainfall Statistics

 

Create a program that reads a list of daily precipitation amounts from the user, calculates statistics, and prints the results. There may be up to 31 daily amounts given. Statistics to be calculated are shown in the sample output. 

Sample Input:

0.1
0.0
0.25
0.05
0.1
0.5
0.37

Sample Output:  

PRECIPITATION STATISTICS
------------------------

Number of Days = 7

Average Daily Precipitation = 0.196

Days above Average = 3 (43%)

Days with NO Precipitation = 1 (14%)

Maximum Precipitation = 0.5 on Day 6

During the Design Phase:

The displayStats method should not do any of the calculations (except the percentages, e.g. 14%) Each of the calculations must be in its own method.

Start with a UML Diagram for each of your Classes. Write a pseudocode algorithm of the steps to solve this problem, and construct a test set for the program following the guidelines discussed in class.

During Coding:

For this project it is OK to put all the code for testing (user I/O) in a separate RainFallTest class with a single method main.

Project Deliverables:

Final Program: (All components in Presentation Format )
Problem Description
UML Class Diagram(s)
Algorithm
Test Set Design
Source Code
Sample Output