QuestionQuestion

Make a Gradebook. It needs to have student numbers(random(index)) and random generated scores (also A->F). They need to be sorted and sum up at the bottom. How many got A, how many got B and so on. The class average also needs to be printed. The number of students is 20 and the scores are 0-200.
It has to print out so that every time
A. 10%
B. 25%
C. 30%
D. 25%
E. 10%
and of course every student that gets 30 points or less gets an F.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

public class Gradebook {

public static void main(String[] args)
{
int[] stuNums = new int[20];
int[] scores = new int[20];
int[] gradeCount = new int[6];
int total = 0;
double average;
boolean swapped;
for(int i = 0; i < 20; i++)
{
stuNums[i] = (int)(Math.random()*Integer.MAX_VALUE);
double val = Math.random();
if(i < 2)
scores[i] = (int)(Math.random() * 20) + 180;
else if(i < 7)
scores[i] = (int)(Math.random() * 38) + 141;
else if(i < 12)
scores[i] = (int)(Math.random() * 50) + 90;
else if(i < 17)
scores[i] = (int)(Math.random() * 41) + 48;
else if(i < 19)
scores[i] = (int)(Math.random() * 17) + 30;
else
scores[i] = (int)(Math.random() * 30);
total += scores[i];
}
average = total/20.0;
for(int i = 0; i < 6; i++)
gradeCount[i] = 0;
do
{...

By purchasing this solution you'll be able to access the following files:
Solution.java.

$20.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats