Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 399 Weeks Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 15 Sep 2017 My Price 10.00

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:

Frequency

---------

Score Obtained By 5 10 15 20 25

----- ----------- ----|----|----|----|----|

0...5 1 *

6...10 7 *******

11...15 10 **********

16...20 3 ***

21...25 2 **

26...30 2 **

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.

Xfile.txt:

Answer key

TFTFTFTFTFFFTTFFTTFFTTTTTTFFFF

Azrin, Neil

FFTFTFTFFFFFTFTFTTFFTTTTTTFFTF

Babbage, Charles

FFFTFFFTTTFFFTTFTTTFTFTTFTFFFF

Boole, George

TTTFFFTDTFFFFTFFTFFFFTTTTTTFFF

Burks, Arthur

FFTFTTTFFFFTTTFTTTFTTTTFTTTFFT

Crick, Francis

TFTFTFTFTFTTFFTTFFTTTTTTTTTTTT

Curie, Marie

FFFFFFTTTFTFFTFTTTTFFFFFTTFTFF

Einstein, Albert

TFTFTFTFTFFFTTFFTTFFTTTTTTFFFF

Franklin, Rosalyn

TFTFFFTFTFTFTTFFFTFFTTFTTTFFFF

Heisenberg, Werner

TFTTFTFTFTTTFFTTFFTTFFFFFFTTTT

Hofstadter, Douglas

TFTFTFTFTFFFTTFFTrFFFTTTTTFFFF

Krieger, Dorothy

FTFTFTFTFTTTTTFFTTFFTTTTTTFFFF

Mead, Margaret

FTTFTFTFFFFTTTFFFTFFFTTTTFFFFF

Minsky, Marvin

FFFFFFFFFFFTTFFTTFFTFFTTTTFFFF

Newton, Isaac

FFFFTFTFTFFFTTFFTTTFTTTTTTFFFT

Olsen, Catherine

TFTFTFTFTFFFTTFFTTFFTTTTTTFFFF

Pascal, Blaise

TFTFFTTFFTFFTTTFTTTFTFTTTFFFFF

Pylyshyn, Zenon

FTFTFTFTFTFFTTFFTTFFFFFFTTFFFF

Ritchie, Dennis

TFFFTFTFTFFFFTFFTTFFTTFTTTFFFF

Sagan, Carl

FTFTFTFTFFTTFFTTFFTTTFFFFFTTTT

Schroedinger, Erwin

TTTFFFTTTTTFTFFFFTFTFFTTTTTTFF

Skinner, B.F.

FTFTFTTFTFTTFFTTFFTTFFFFFFTTTT

Turing, Alan

TTTFTFTTTFTFTTFFTFFFTFTTTTTFFF

Van Allen, James

TFTFTFTFTFFFTTFFTTTTFFFFFFTTTT

Von Neumann, John

FFTFTFFFTFFFTTFTTTFFTTTTFTFFFF

Watson, James

FTFTFTFTFTTTFFTTFFTTFFFFFFTTTF

Answers

(5)
Status NEW Posted 15 Sep 2017 10:09 PM My Price 10.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)