Program 1 (25 pts)

Write a Java program to get the average of a collection/assortment of numbers. The numbers can be input from the console or a file and the result output to the console or a file. Provide sufficient instructions to anyone running the program. If there are constraints that the user needs to be aware of, make sure to communicate these to the user. The user should not be adversely constrained by number of elements or type of data (integer and real numbers should work). Be sure to handle and test invalid input.

Your program should use the following features, constructs:

- a variable name

- an aggregate data type such as an array (a string will not satisfy this req.)

- an expression and assignment statement

- a statement-level control structure such as a loop

- a subprogram

- error handling

This project should run on the local Linux system.

Due at class start time: E-mail a copy of your source code (as a separate file), screen prints of your testing, your input and output, (limit the file sizes – but not the font size).

See grading rubric (available on my website and the syllabus)

Excellent 5 / Good / Satisfactory / Unsatisfact 0
Specifications
Variable
Aggregate
Expression
Assign Stmt
Loop
Subprogram
Error Handling / The program works and meets all specifications. / The program works and produces the correct results and displays them correctly. It also meets most of the other specifications. / The program produces correct results but does not display them correctly. / The program performs tasks that it was not supposed to perform.
Efficiency
(within the requirements) / The code is extremely efficient without sacrificing readability and understanding. / The code is fairly efficient without sacrificing readability and understanding. / The code is brute force and unnecessarily long. / The code is huge and appears to be patched together.
Correctness / Program correctly handles all specified test cases and additional special cases. Program contains error checking code. / Program executes without errors and correctly handles most special cases.
Thorough testing has been completed. / Program executes without errors for pre-specified test cases. / Program does not execute due to errors. No evidence of testing.
Documentation / Clear and complete documentation. The purpose and constraints of every variable and subroutine are described.
Comments for code segments make the code easy to follow. / The purpose of all variables is clearly explained. The purpose of each subroutine is described. / Most variables and subroutines are commented. Comments provide some assistance with understanding the code. / No comments included or other documentation provided
Reuse / Contains documented subunits; subunit implementation can change w/o affecting the interface and lends themselves to polymorphism. / No reuse potential