On This Page
Overview
During this assignment, you will write an application using:
- Relational expressions
- Conditional statements
- Repetition
^ top
Specifications
Operation
- The program starts and prompts you to enter a test score or to end the program by entering a
-1.
Number of A's: 0
Number of B's: 0
Number of C's: 0
Number of D's: 0
Number of F's: 0
Enter a score (%) or -1 to end: 90
As you enter each score, the application decides whether the score is an A, B, C, D or F and adds one to the letter-grade tally.
Number of A's: 1
Number of B's: 0
Number of C's: 0
Number of D's: 0
Number of F's: 0
Enter a score (%) or -1 to end: 95
Each time you enter a score, the program updates the tally.
Number of A's: 2
Number of B's: 0
Number of C's: 0
Number of D's: 0
Number of F's: 0
Enter a score (%) or -1 to end: -1
When you are done entering scores, the program displays a simple bar graph of the tally for A's, B's, C's, D's and F's.
A's: **
B's:
C's:
D's:
F's:
Additional Specifications
- Tally the number of A's, B's, C's, D's and F's using the following scale:
| Numerical Grade |
Letter Grade |
| greater than or equal to 90 |
A |
| less than 90 but greater than or equal to 80 |
B |
| less than 80 but greater than or equal to 70 |
C |
| less than 70 but greater than or equal to 60 |
D |
| less than 60 |
F |
- The tally graph must display a single '
*' for each unit tallied.
- When a user enters a
-1, the program must display the final graph and exit.
- The output of your program must display prompts and a tally graph similar to that shown in the Operation section above.
- The name of the file must be
scoretally.cpp.
- You may assume that a user will enter correct data only.
^ top
Extra Credit
Adding the following to your program are worth extra credit points:
- Use pair programming. (1 point)
- When the program ends, display the number of scores, average score, and best score. (1 point)
Number of scores: 2
Average score: 92.5
Best score: 95
Note that the average score is the sum of all scores divided by the number of scores.
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
- Generates correct output given correct input
- All test cases pass
- 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
- All test cases pass
- 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
- All but one test case passes
- 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
- At least 1/2 of all test cases pass
- 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
- Less than 1/2 of all test cases pass
- 0: Does not execute or no specifications met
Programming Style
- 4: Code is well-documented
- Name, date, and program description in file comment block
- Follows specified format for file comment block
- Proper use of spaces around operators
- No tab characters are present in the source code
- As described in How To Document and Organize C++ Code
- 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 file submitted but some information was missing
- 0: No
README.txt file 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
scoretally.cpp
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
| Day Schedule
| Eve Schedule
Course info
| Help
| FAQ's
| HowTo's
| Links
Last Updated: September 11 2004 @17:49:14
|