Anne Dawson: CSCI101A_LAB6_SP04.htm   

 

Last updated: Wednesday 11th February, 12:45 PT

 

This document is subject to change without notice.

 

Please report any errors or omissions in this document:

adawson@coquitlamcollege.com

 

Special instructions:  For this assignment you may work in teams of 2, or alone.

This lab is due at the end of the lab session.

 

This is a timed and assessed lab with no instructor assistance.

This lab is due at the end of the lab session.

The folder will be closed for saving at 4pm precisely.

There are absolutely no late submissions.

 

Lab 6 Specification:

-------------------

 

Write a grading program for a computer science course. The following grading policy applies:

a. The are two quizzes, each graded on the basis of 10 points.

b. There is one midterm exam and one final exam, each graded on the basis of 100 points.

c. The final exam counts for 50% of the overall grade, the midterm counts for 30%, the two quizzes together count for a total of 20%. Don't forget to normalize the quiz scores: they should be converted to percentages before they are averaged in to the final grade. The grading is simple: >= 50 is 'P' pass, < 50 is 'F' fail.

 

You should define a class to store the student record (collection of scores). There should be an instance variable for the each quiz and exam, a variable to store the student number, overall numeric score and the final letter grade.  The overall numeric score is a number in the range 0 - 100, which represents the weighted average of the student's work. The class should have input and output member functions. The input member function should ask for the student number (a number on the range 0 to 32), quiz and exam scores only. The overall numeric score and letter grade are calculated by member functions. The member functions which calculate the overall score and letter grade are void functions that set the appropriate instance variables.  If you wish, you can create other methods. Remember that one method can call another method. Make all member functions (apart from helping member functions) public and all instance variables private. Use at least one accessor and one mutator method. There should be one default constructor which sets all instance variables to 0 (for scores) and to the character '-' for the letter grade.

 

Name your source code file lab6.cpp.

 

Use the following data to test your program:

 

Quiz 1 (out of 10)  = 5   Weight = 10%      5/10 * 10 = 5

Quiz 2 (out of 10)  = 7   Weight = 10%      7/10 * 10 = 7

Midterm (out of 100)=67   Weight = 30%    67/100 * 30 = 20.1

Final (out of 100)  = 78  Weight = 50%    78/100 * 50 = 39

 

                           Overall score (out of 100) = 71.1

                                         Letter grade = P       

 

For this and every lab you should follow the instructions in: http://www.coquitlamcollege.com/adawson/CPP_Labs.htm

paying particular attention to the notes in blue at the bottom of the page.

 

 

Submission instructions:

-----------------------

 

At the end of the lab session you should save just your source code file (lab6.cpp) to your folder in CSCI101A\Week06\Lab6.

 

If you are working in a team, both team members save the same file to their own folder.

 

Make sure that you include your name/s, the date and filename (lab6.cpp) in comments at the top of the code.

 

 

 

Marking Scheme :

--------------

 

The following marking scheme applies:

 

 

Course Code:      CSCI101A

Semester:         SP04

Assignment Code:  Lab6

Instructor Name:  Dr Anne Dawson

Assignment:       A grading program using a class

Student1 Name:

Student1 Number:

Student2 Name:

Student2 Number:

 

 

DESIGN

 

1.  The program has appropriate modularity

    i.e. functions are used where it makes sense to use them.   /10

                       

2.  Appropriate data types are used.                            /10

 

3.  Appropriate control structures are used

    (i.e. loops and decisions).                                 /10

 

4.  The User Interface (output to the screen) is

    clear and tidy.                                             /10

 

MAINTAINABILITY

 

5.  The program is commented appropriately - including

    date, filename and pre- and post-condition     

    comments                                                    /10

 

6.  The program has meaningful identifiers.                     /10

 

7.  The program is indented (spaced out) correctly, to

    aid the understanding of the code.                          /10

 

8.  The code is easy to follow.                                 /10

 

CORRECTNESS:

 

9.  The program compiles with 0 errors and 0 warnings.          /10

 

10. Appropriate test data and results are shown in

    the comments at the top of the code. 

    An appropriate number and variety of test data

    sets is supplied.                                           /10

 

 

                                               % Complete:

                                                    Total:     /100

                                                     Date: