CPTR-142 Homework #8 - Due Friday 4/25/14


For program 8 finish the design of, and write the code for, a class that creates a list based on an array as we discussed in class. This class will define a list of student scores (integer values 0 to 100, i.e. percent) and have a set of functions that include, but are not limited to: You may wish to have other functions, that is ok. You need a default constructor that will create and initialize the array and possibly other variables. To denote an empty array entry we agreed to place -1 in it. I suggest a default array size of 10 items. You could create a second constructor that would allow a parameter to be passed to it for determining how large the array will be.

Write a main that will declare one or more objects, put some data into the array, get the average and display it. (You could have a display function in the class that would display the number of items and their average, but that is not required).

Note that I have allowed some flexibility in this assignment. So have fun with it!

Bring a printout of your main.cpp file to class. Email the main.cpp files to me but as you do that change the name to: name_program8.cpp where name represents your last name. And between name and program8 is an underscore. I appreciate not having spaces in your file names.

Larry Aamodt PhD, PE
Professor of Engineering and Computer Science
Walla Walla University
Contact:
via email: AamoLa (at) wallawalla.edu
via phone: x2058