Project on GRADING SCORES

Course: CSE 103
Project Number: 4
NSD Due Date: week prior to program deadline
Project Due Date: (see the calendar on Angel)
Project Filename: a:grader.bpr
Program Filename: a:grader.cpp
Output Filename: a:grader.txt
Project Objective: To utilize modularization and arrays in the context of a multiple task problem.
Problem:
  1. Write a highly modularized C++ program that will grade a set of scores according to the discussion in class.
  2. Store the scores in an array.
  3. Include a function for each of the following:

    1. a function that will calculate the mean or average m
    2. a function that will calculate the standard deviation s
    3. a function that will grade the scores xi,   i = 1, 2, ..., n
    4. a function that will do the sorting, (you may use your sorting program and header files)

  4. Recall the formula for calculating the average m

    m = S xi / n = ( x1 + x2 + ... + xn ) / n,   i = 1, 2, ..., n

    and the standard deviation s of a set of numbers

    s = (( n S xi2 – ( S xi ) 2 ) / ( n ( n – 1 ))) ½,   i = 1, 2, ..., n

  5. Use the intrinsic pre-defined C++ function sqrt.
  6. The following determines the range of scores for each letter grade:
    A : m + 4/3 s <= x
    A– : m + 3/3 s <= x < m + 4/3 s
    B+ : m + 2/3 s <= x < m + 3/3 s
    B : m + 1/3 s <= x < m + 2/3 s
    B– : m + 0/3 s <= x < m + 1/3 s
    C+ : m – 1/3 s <= x < m + 0/3 s
    C : m – 2/3 s <= x < m – 1/3 s
    C– : m – 3/3 s <= x < m – 2/3 s
    D+ : m – 4/3 s <= x < m – 3/3 s
    D : m – 5/3 s <= x < m – 4/3 s
    F : x < m – 5/3 s

  7. Follow the sorting algorithm you did in the sorter program.
Input: Enter the following grades interactively or using an input textfile:
100, 94, 59, 83, 57, 11, 92, 76, 37, 89, 74, 59, 65, 79, 49, 89, 89, 75, 64, 82, 15, 74, 82, 68, 92, 61, 33, 95, 91, 82, 89, 64, 43, 93, 86, 65, 72, 40, 42, 90, 81, 62, 90, 89, 35, 81, 48, 33, 94, 81, 76, 86, 67, 70, 100, 80, 83, 78, 96, 58
Note:   m = 71.47   s = 21.16
Try another set of scores.
Output: The output textfile should have the following:
  1. a summary page consisting of the following:

    1. mean or average score m,
    2. standard deviation of the scores s,
    3. in tabular form, the range of scores for the different grades
      ( A, A–, B+, B, B–, C+, C, C–, D+, D, F ),
    4. in tabular form, the tally or the list of the number of scores receiving an
      A, A–, B+, B, B–, C+, C, C–, D+, D, F.

  2. a second page consisting of the original unsorted list of scores with the corresponding grades in tabular form complete with heading, and
  3. a third page consisting of the descending sorted list of scores with the corresponding grades in tabular form complete with heading.
Reminder: Follow General Instructions for Programming and the Basic Formatting Guidelines.

© 1998-08-31 cpsm ; last update 2003-11-03 11:17