Hi there, I have been given this question to complete but I can't seem
to get my code working properly. I'm very new to C# so sorry if i come
across as stupid!
Here is the question...
Create a class that represents the grade distribution for a given course. In this class you should write methods to perform the following tasks:
•
Read the number of each of the letter grades A, B, C D and F
•
Set the number of letter grades A, B, C, D and F
•
Return the total number of grades
•
Return the percentage of each letter grade as a whole number between 0 and 100 inclusive
•
Draw a bar graph of the grade distribution
The graph should have five bars, one per grade. Each bar can be a horizontal row of asterisks, such that the number of asterisks in a row is proportionate to the percentage of grades in each category. For example, let on asterisk represent 2%, so 50 asterisks correspond to 100%. Mark the horizontal axis at 10% increments from 0 to 100% and label each line with a letter grade.
For example, if the grades are entered as 1A, 4B's, 6C's, 2D's and 1 F, then the output would look like:
0 10 20 30 40 50 60 70 80 90 100
IIIIIIIIIII
**************************************************
**** A
************** B
******************** C
****** D
E
**** F
In addition, you will have to use simple testing techniques in order to evaluate the program you have written. Your testing strategy for your code could include examples of the following:
•
Black box testing
Initialisation and termination of the program Interface
Performance errors
•
White box testing
Test loops
Test logical decisions
Test variable assignments
This should be written up in the form of a report (no more than two pages) which outlines the tests you have performed and their results.
It is my third day today I'm trying to get the program worked and there are still errors... :(
Hope you can help me
Many Thanks
Angela