This exercise introduces students to the array as a means of storing and processing sequences of values.
The exercise consists of reading a sequence of student names and their averages into arrays, so that the averages can be easily processed. The 'processing' consists of computing the mean and standard deviation of the averages, and then computing the letter grade for each student's average, using the "curve" method of grading. The exercise thus introduces students to the pitfalls of "grading on the curve" as well as arrays.
As a final task, we will read data in from a file instead of the keyboard.
A skeleton program is provided in Grades.java. Since some of the operations we will be creating are reusable, we store them in a module class implemented in DoubleArrayOps.java, with a documentation file DoubleArrayOps.doc. These .java files will need to be added to a project in the usual manner, to coordinate the compilation and linking. Also needed will be the ann and hoj packages.
Sample data files are provided in scores1.data, scores2.data, and scores3.data.
Back to This Lab's Home Page
Forward to the Prelab Questions
Back to the Table of Contents
Back to the Introduction