Spring, 1997
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:
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 GradeFollowing 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:
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.