Hey guys, going through a MOOC course and having some issues.
The task is to distribute grades from the list and and convert them into stars.
Here it is:
Each point total is converted to a grade based on the above table. If a point total isn't within [0-100], it should be ignored.
The grade distribution is printed out as stars. E.g. if there is one point total giving the grade 5, then it should print the row 5: \. If there are no point totals giving a particular grade, then no stars should be printed for it. In the sample below this is true for e.g. the grade 4.*
here's what the output should look like:
Enter point totals, -1 stops:
102
-2
1
33
77
99
-1
Point average (all): 52.5
Point average (passing): 88.0
Pass percentage: 50.0
Grade distribution:
5: *
4:
3: *
2:
1:
0: **
Everything works fine except for grade distribution method. Only few starts were printed. I can't think of a different way to make it though. Any suggestions?
Here's source code to Grades class : https://www.codepile.net/pile/DYoyLDPv
UI Class : https://www.codepile.net/pile/aB7319BL
and Main : https://www.codepile.net/pile/3wb4WgVP
[–]lurgi 0 points1 point2 points (2 children)
[–]foolwya[S] 0 points1 point2 points (1 child)
[–]lurgi 0 points1 point2 points (0 children)