CIS 223
Programming Project Number 3-S97
Working with Collections of Data

Spring, 1997

Required Reading: Complete reading given in Part B of the Syllabus, especially Sections 7.5 - 7.8 (examine pp. 320-331 carefully) of Headington and Riley.

Note: This is a group project, but I expect each member of the group to understand what the other members have to do. Only AFTER the problem is clearly understood and all the components are mapped out should you divide up the work. It is important that you work together to set up milestone dates by which each phase of work should be completed. Before you split up, your group MUST:

  1. complete a detailed structure chart;
  2. complete a very detailed data requirements table;
  3. clearly define the interfaces between each pair of components involved in your solution;
  4. be sure that everyone has a good understanding of the outline of how each system component will work;
  5. specify the milestone date by which each component will have been completed and tested so that integration testing can begin.
The Problem Specification: Almost every department at Temple teaches large sections of certain courses. Often, the exams for these courses are short answer, perhaps involving some true/false or multiple choice questions. Normally, the answers are entered by students in the course on special mark- sense forms which are then scanned into a computer and stored as part of a file containing all the mark- sense records for a given exam.

We will assume that the real exam results we are processing have already been read from a set of mark- sense sheets and stored on a file on the k drive. Our problem will be to take the exam answers for all students in a typical Temple course, grade each exam (that is, determine the number questions answered correctly by the student and the proper letter grade for that student). We will print a four-column table with the following headings:

 
Final Exam Grade Tabulation					     Fall, 1996 
 
Course Number: ________  {prompt user for this 9 character string—e.g. CIS 067} 
Instructor: _________	 {prompt user for a maximum 20 character string} 
 
 
            					Number     Percent  
Student Social	  			      of Correct of Correct	Letter 
Security Number 	   Student Name		Answers	   Answers	Grade 
Following this table, we will compute and print some standard statistics such as the mean, median, range, and standard deviation of the class results. We will also display the number of As, Bs, Cs, Ds, and Fs.

Problem Analysis (a start): You should begin by indentifying and naming the objects to be manipulated. In this problem you will be working with several different collections of data. For example, we have collection (of size num_students) of students. For each student, we have a Social Security Number, a name, a collection (of size num_questions) of answers to the exam questions, and some additional values to be computed.

For the collection of questions, we need an answer_key which identifies the correct response for each question (perhaps a letter between A and Z).

To summarize these key data elements:

Collection of students (size num_students). For each student we have:

The answer key—a collection of correct_answers (size num_questions).

Once we have processed all of the exam questions, we will need to compute the values of a number of statistical measures concerning the results—the mean (average) of all the exam scores, the median, the standard_deviation, and the range (largest_value - smallest_value). We should also determine the number of As, Bs. Cs, Ds, and Fs:

Software Design: You should try to solve this problem by re-using program components developed by other people and by “growing your own” re-usable components as needed. For example, to compute the median and the range, it is helpful to first sort the data. You already have a sort routine that can easily be reused with very little modification. In addition, since collections of data are such an important part of this project, we are going to give you a parts of a template class for a safe collection of data. Once you understand how this template class works and how to use it, I think you will find it useful. The rest of what has to be done will be relatively easy.

At this point, you and your group should draw a structure chart and map out an initial version of a data requirements table. Some examples of what your chart and data table might look like are shown on pp. 603 and 604 of the Friedman/Koffman text (first edition). You can use any old sort function you want, including the one shown on p. 461 of the F/K text. Be sure that you verify the answers to each question and the information enterred as part of the answer key. Finally, the template class that we will use as the basis for defining the collections data types that we require is shown on pp. 612-614

Turn In: Completed program with a test run example using the data on the file CrseExam.dat which the lab assistant will make available for you.

Due Date: To be determined.

Return to Previous Page