I am stuck with my Java coursework. Help please! This is what I have to do:
"The program should allow the tutor to enter in the various marks which the students have been awarded, until the tutor enters in a mark exceeding 100. At this point the program should display a histogram. Each star represents a student who achieved a module mark in the range shown.
0 - 29 -------*** (3 students received a mark between 0-29)
30-39 -------*****
40-69 -------********
70-100 ------****
--- denote spaces
20 students in total
What I have to do is to make a program in Java following the instructions mentioned above. Whenever I add a grade, a star must be added to the corresponding group. The same 4 categories will be used.
I know what to do mostly in this (use while loops, if-else statements, printing a star for each category) but I am stuck with how to display the histogram at the end (when the user enters 100+, the program stops and then the result histogram is shown.
Thanks
"The program should allow the tutor to enter in the various marks which the students have been awarded, until the tutor enters in a mark exceeding 100. At this point the program should display a histogram. Each star represents a student who achieved a module mark in the range shown.
0 - 29 -------*** (3 students received a mark between 0-29)
30-39 -------*****
40-69 -------********
70-100 ------****
--- denote spaces
20 students in total
What I have to do is to make a program in Java following the instructions mentioned above. Whenever I add a grade, a star must be added to the corresponding group. The same 4 categories will be used.
I know what to do mostly in this (use while loops, if-else statements, printing a star for each category) but I am stuck with how to display the histogram at the end (when the user enters 100+, the program stops and then the result histogram is shown.
Thanks