Automated Exam Grader

    Programming Assignment 5: Automated Exam Grader
    COP 3014 – Fall Term 2013
     Point Value: 100 points
    Project Due Date: Wednesday 11/15/2013 11:59 p.m
    ——————————————————————————–
    Learning Objectives
    •To write a program which requires the manipulation of one-dimensional arrays
    •To utilize parallel arrays
    •To set up array types using the typedef construct
    •To perform frequency counting and draw a histogram to represent data
    •To perform text file input
    •To design a program on your own which is well-structured, modular, utilizing multiple functions and parameter passing appropriately
    Problem Statement
    Your Xenobiology professor has decided to give you a completely True/False final exam. Since she discovered you are a C++ programmer, she has offered you extra credit if you will write a program to analyze the test data. This sounds good, so you have accepted the job.
    Your task is to analyze the data file which contains the test answer key and each student’s answers. To do this you will determine each student’s test score and the mean for the entire class. Also you will generate a histogram using the test scores. There are exactly 25 students who took the exam.
    Calculate the mean exam score as the sum of all scores divided by the number of scores, as a real number.  Display the mean in your output with 2 digits of precision.
    Input
    The input file is named xfile.txt, and is available from the course web site.  You may hardcode this specific filename into your program.  Download the file from the course web space into the same folder which contains your .cpp file.  The file has the following format:
    1st data line: the test answer key, in columns 1 thru 30 (there are exactly 30 questions on the test)
    Remaining data lines: a student name on one line, followed by the test answers recorded for that student on the next line. This pattern is repeated for all 25 students. The list is in alphabetical order by student name, and all data lines contain the required information starting in column one.
    Example data:
    TFTFTFTFTFTFTFTFTFTFTFTFTFTFTF
    Einstein, Albert
    TFTFTFTFTFTFTFTFTFTFTFTFTFTFTF
    Jones, Forgetfull
    FTFTFTFTFTFTFTFTFTFTFTFTFTFTFT
    etc…
    BAD DATA: the only bad data you are required to check for is test answers which are not the upper case letters ‘T’ or ‘F’.  If an  invalid character is found, count the invalid character as a “wrong” answer, and continue processing the data line normally.  However do print an error message as part of the output table which indicates what has occurred.  You may assume that the test answer key is completely valid, and so are the student names.
    You are required to implement a check to see if the data file has opened successfully, and if it has not, your code must terminate the program with a descriptive error message. You may use either the return function and implement a second return in main (like the return (EXIT_FAILURE) shown in lecture 17), or you may use the exit function and exit from any function in the program, as shown in the same lecture.
    Output
    •Echoprinted input (some of which is included in items below).
    •A table giving the list of student names in the order they were read in, the test answers for that student, and the student’s test score. This table will incorporate data error messages if needed.
    •The mean test score.
    •A histogram showing the number of students who received scores in the following ranges: 0 thru 5, 6 thru 10, 11 thru 15, 16 thru 20, 21 thru 25, and 25 thru 30. The  histogram should look something like this:
    Data Structures
    This project is intended to familiarize you with the use of standard one-dimensional arrays, parallel arrays, and basic use of the string class in C++.  You are required to use one-dimensional arrays to store the test answer key (a one-dimensional array of char), the student’s answers (a parallel one-dimensional array of char), and the frequency counts (a one-dimensional array of int) required for the histogram. 
    Use a C++ string class object to read, store and print out each student’s name.  Use either a C-string or the string class to hard-code your file name, which should be a string constant in this program.
    You are required to use these core-language one-dimensional arrays and C++ string class objects in this project. You may not use any two-dimensional arrays, dynamic arrays, structs or user-defined classes on this project.  You also may not use the C++ Standard Template Library classes or algorithms with the exception of using the C++ string class to store and work with the file name and student name string data in this program.
    You are required to use the typedef construct to create your array types for the exam answer arrays and for the frequency counting array.
    Use Of Functions, Parameters, Modularity, Design et. al.
    Part of your grade on this and ALL future programming projects in this course will be determined by how well you utilize multiple functions and parameter passing appropriately and how well you design a modular and functionally cohesive program using the principles discussed in class. Large grade point penalties can be incurred for not setting up a modular, well designed program structure. Global variables must not be used or large point penalties will be applied. All of the above emphasizes good program structure, design, and very basic, fundamental software engineering principles. Start by working on a good design, structure chart, etc. Recitation meetings will also be an excellent source of help with this.

                                                                                                                                      Order Now