This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
John is right, we don't even know what your program should do. Also, note that we are NotACodeMill; we will guide you, but not write your program for you. And next time please UseAMeaningfulSubjectLine.
You are required to write a program in Java that achieves this. The program is in a number of parts.
1. 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.
This is an example of the output. The example below shows the distribution of marks for 20 students. Your program should work with any number of student marks entered.
20 students in total.
As the tutor enters each mark, a counter should count the number of student’s marks which have been entered.
Use the same 4 category ranges shown here.
Make sure the display is neatly formatted as above.
Your program should make use of ‘loops’ for the display of each category.
2. After the histogram, a variety of statistics should be displayed (e.g. average mark awarded, number of students passing, highest mark, and lowest mark)
3. The histogram shows each category horizontally across the screen. Copy your original solution and make changes to the copy to display the histogram vertically (the stars in a category should go downwards and not across the screen).
4. An extra for the very brave!
Modify your vertical display program to first ask the tutor how many categories are required, and the program should then show the display with the correct categories. (This requires knowledge beyond that covered so far on the module).
Ok, so how far are you with the assignment? Post your code (between [code] ... [/code] tags, so that it will be nicely formatted by the forum) and explain us where exactly you got stuck - then we'll be glad to help you get over the difficulties.
(We're not going to do your complete homework assignment for you, because then you wouldn't learn anything!).