On This Page
Overview
During this assignment, you will:
- Calculate your grade for this course
- Use classes to organize your application
- Use objects to contain your data
- Read data from text files
Background Information
Grades are calculated by dividing the total actual points by the total possible points within each assessed area. These numbers are usually expressed as a percentage. For example, we may have 10 exercises worth 10 points each, or 100 points total. Your actual score on the exercises may add up to 95 points. Thus, your total exercise score is 0.95, or 95%.
Since there are multiple areas of assessment, you must calculate the percentages for each area and multiply the percentage times the weight for that area. Continuing our example, exercises may be worth 10% of the total grade. Thus the weighted percentage is 0.95 * 0.10 = 0.095.
To arrive at your total score, you sum the weighted percentages of each area.
Note the following information about scores and grading:
- All the evaluation areas and weights are on the Course Information page.
- Since you have not taken the final exam yet, your final grade will be different than your score to date.
- Each individual item in some assessed area may have different possible scores. For instance, assignment 1 has a possible score of 10 while assignment 2 has a possible score of 20. Thus, for every item you must consider data for both possible scores and actual scores.
- The lowest exercise score is dropped in determining the weighted percentage for exercises.
- It is possible to earn more credit on an assignment, at least in this course, than the maximum score. This is accomplished through extra credit and helps students make up for problems on any one assignment.
- The scores in one evaluation area cannot influence the scores in another. For instance, if you have 105% on your assignment scores, you cannot apply the extra 5% toward the total score.
- All your score data is in WebCT.
^ top
Specifications
Create a grade book application that encapsulates your scores and calculates your grade for this course. Use the class and function declarations of the starter code to begin the design of your application.
Define and implement a class named Scores that is a container for the scores of an assessed area. Design the class as follows:
- The class should contain instance variables for the total actual scores, total possible scores and percentage weight.
- Use the constructor to initialize these variables.
- Code a function named
loadScores() that accepts an input stream and then uses that stream to read all the actual and all the possible values.
- Code another function named
calcPercentage() that calculates the weighted percentage for the Scores object. The weighted percentage is defined as:
(actual / possible) * weight
- Also code a function named
showValues() that displays the total actual scores, total possible scores, percentage weight and weighted percentage for the Scores object like that shown in the Sample Output.
In addition, define and implement a class named GradeBook that is a container for all the Scores objects. Design the class as follows:
- The class should contain instance variables for each of the Scores objects as well as the sum of the percentages.
- Use the constructor to initialize these variables.
- Code a function named
loadScores() that opens an input stream and passes it by reference to each of the Scores objects. Be sure to close the stream after the last object has read input from the file.
- Code another function named
sumPercentages() that gets the weighted percentage from each Scores object, sums them, and stores the final result in the correct instance variable.
- Code still another function named
toLetterGrade() accepts by value a percentage and returns a char for the letter grade.
- Also code a function named
showValues() that displays the total actual scores, total possible scores, percentage weight and weighted percentage for each Scores object.
- Finally, code a function named
displayGrades() that displays summary information like that shown in the sample output.
Sample Output
Exercises:
Actual = 32
Possible = 40
Weight = 0.15
Weighted Percentage = 0.12
Homework:
Actual = 75
Possible = 70
Weight = 0.35
Weighted Percentage = 0.35
Midterm:
Actual = 40
Possible = 50
Weight = 0.2
Weighted Percentage = 0.16
Final:
Actual = 0
Possible = 0
Weight = 0.3
Weighted Percentage = 0
Sum of percentages: 0.63
Letter grade to date: D
Percentage without final: 0.90
Letter grade without final: A
Additional specification are:
- Create a human-readable data file containing your raw score information (do not use summarized information). Do not forget to remove the lowest exercise score from the file.
- Display all output to at least three digits of accuracy
- All input must be from files (do NOT use any
cin statements).
- Do not change the names of the given classes or functions for this assignment. You may add additional functions, but you must make use of the ones provided.
- Do not use separate compilation for this assignment
- Do not forget to document all the code. Though I have put a few comments in the starter code, you are responsible for the accuracy and completeness of the final comments.
^ top
Extra Credit
The following are worth extra credit points:
- Save the output to a file named "results.txt" as well as displaying output to the screen. (1 point)
- Add code that returns the score you need to achieve on the final exam to get an "A", "B" or "C" grade in the course. For example: (1 point)
Score needed on final for A: 90.00
Score needed on final for B: 56.67
Score needed on final for C: 23.33
- Complete the pair programming log. (1 point)
Make certain that your README.txt file describes any extra credit attempted.
^ top
Grading Criteria
The instructor will evaluate your assignment using the following criteria. Each criteria represents a specific achievement of your assignment and has a scoring guide. The scoring guide explains the possible scores you can receive.
Some scoring guides have a list of indicators. These indicators are a sign of meeting, or a symptom of not meeting, the specific criterion. Note that a single indicator may not always be reliable or appropriate in a given context. However, as a group, they show the condition of meeting the criterion.
For information on grading policies, including interpretation of scores, see the course information page.
Program Compilation
- 4: Source code compiles with no errors or warnings
- 2: Source code compiles with warnings
- 0: Does not compile or wrong file turned in
Functionality
- 10: Demonstrates mastery of the assignment
- Has extra features or demonstrates techniques beyond the assignment
- Applies concepts from the lesson(s) appropriately
- Meets all specifications (see above) with particularly elegant solutions
- No errors encountered during operation
- 8: Has all the functionality expected of the assignment
- Demonstrates many techniques from the lesson
- Meets all specifications (see above)
- Implementation seems more complicated than necessary.
- May have one minor error
- 6: Has most of the functionality expected of the assignment
- Demonstrates some techniques from the lesson
- Meets all but one of the specifications (see above)
- Implementation seems excessively complicated.
- May have 2-3 minor errors
- 4: Has some of the functionality expected of the assignment
- Demonstrates some techniques from the lesson
- Meets at least 1/2 of the specifications (see above)
- Implementation seems excessively complicated.
- May have more than 3 minor errors
- 2: Serious functional problems but shows some effort and understanding
- Meets less than 1/2 of the of the specifications (see above)
- Has a major error or many minor errors
- Implementation seems very convoluted
- Demonstrates few techniques from the lesson
- 0: Does not execute or no specifications met
Code Documentation
- 4: Code is well-documented
- 3: Code has minor documentation errors
- Has 1 documentation error
- 2: Code has some documentation errors
- Has 2-3 documentation errors
- 1: Code has many documentation errors
- Has more than 3 documentation errors
- 0: No apparent attempt to document code
REAME.txt File
- 2: README.txt file submitted with specified information included
- 1: README.txt submitted but some information was not included
- 0: No README.txt submitted
Maximum Score: 20, plus extra credit
^ top
What to Turn In
Submit your assignment following the instructions for homework. Include the following items for grading:
README.txt file
gradebook.cpp with all source code needed to make your program function.
- A data file containing your grade information
- Any other file needed to make your program function
You must submit all the files needed to make your assignment function properly. Do not assume that the instructors has any files unless explicitly stated by the instructor. Your assignment must work as submitted.
^ top
Home
| WebCT
| Announcements
| Schedule
| Expectations
| Course info
Help
| FAQ's
| HowTo's
| Links
Last Updated: April 25 2004 @20:52:36
|