Instructions:
- Download GradeDistribution.java and GradeDistribution.class. Put it into a folder (preferably near the C:\ drive) where you know where it is.
- Get to a command prompt. (Usually Start > Programs > Accessories on Windows XP).
- Type cd DIRECTORY where DIRECTORY is where you saved the two files at. [[So, for example, if I saved the two files in a folder called Test in the C:\ drive, the location of the folder would be C:\Test. So, you would type cd C:\Test to access that directory.]]
- Then type java GradeDistribution
This is, of course, where the program begins. The following is what the program is supposed to do (and where I need people to check my code/program for durability):
Create a class that graphs a grade distribution (number of A's, B's, C's, D's, and F's) horizontally by printing lines with proportionate numbers of asterisks corresponding to the percentage of grades in each category. Write methods to set the number of each letter grade; read the number of each letter grade; return the total number of grades; return the percentage of each letter grade as a whole number between 0 and 100, inclusive; and draw the graph. Set it up so that 50 asterisks correspond to 100 percent (each one corresponds to 2 percent), include a scale on the horizontal axis indicating each 10 percent increment from 0 to 100 percent, and label each line with its letter grade. For example, if there are 1 A, 4 B's, 6 C's, 2 D's, and 1 F, the total number of grades is 14, the percentage of A's is 7, the percentage of B's is 29, the percentage of C's is 43, the percentage of D's is 14, and the percentage of F's is 7. The A row would contain 4 asterisks (7 percent of 50 rounded to the nearest integer), the B row 14, the C row 21, the D row 7, and the F row 4.
So, again, I'm open to suggestions in my code and looking for things to add, in addition to checking if my program is fully functional without run-time (shouldn't be) or logic errors. So, if you have some spare time or are bored, help me out. ;) Any help and/or suggestions will be very appreciated. If you need any help getting it to run or questions on my code, don't hesitate to ask by posting here or by Chatmail/PM.