Site Search

CS 111: Program 1 main content

Do Programming Challenge #1: RainFall Class on page 537 of your textbook.

Sample Session

Duplicate the sample session exactly. n.m indicates user input.

Please enter the inches of rainfall for all 12 months of the year,
beginning with January

January:      1.2
February:     3.5
March:        3.6
April:        2.1
May:          6.5
June:         2.6
July:         1.0
August:       1.6
September:    -3.5
Rainfall must be 0.0 inches or more, Please re-enter: 2.3
October:      3.1
November:     3.1
December:     2.5

Total rainfall for the year:       33.10 inches
Average rainfall for this year:    2.76 inches
Month with the most rain was:      May with 6.50 inches
Month with the least rain was:     July with 1.00 inches

Programming Style Requirements

Read through the Java Programming Style Guide for expectations.

Begin every java file with the following file header:

//***********************************************************************
// Project: Program 1
// Account: cs11102_nn
//
// Author: Place your name here
// Creation date: 10/27/2004
//
// Completion time: n hours total
//
// Honor Code: I pledge that this program represents my own program code.
//   I received help from (no one) in designing and debugging my program.
//***********************************************************************

Use jGRASP's Control Structure Diagram (CSD) for indentation. Print your source code with CSD and line numbers.

What to turn in

  1. Two source program printouts: Driver.java and RainFall.java stapled together with file header comments on both printouts
  2. Be sure your project is saved in your u:\Program1\ folder
  3. The assignment is due at the start of lab 2. You program must compile and produce output for you to receive any credit.
    • You are allowed one late programming assignment for the quarter.

Grading Criteria

50 points maximum