Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write a program that is the same as the program given below but using sca

ID: 3632463 • Letter: P

Question

Please write a program that is the same as the program given below but using scanner and not the jpb package SimpleIO.prompt as when compiling the error (jpb package does not exist) is printed

here is the website to for the jpb simpleio:  knking.com/books/java/jpb/index.html

// Computes the average of a series of scores

import jpb.*;

public class AverageScores2Modified {
public static void main(String[] args) {
// Prompt user to enter number of scores
SimpleIO.prompt("Enter number of scores: ");
String userInput = SimpleIO.readLine().trim();
int numberOfScores = Integer.parseInt(userInput);
System.out.println();

// Create array to hold scores
int[] scores = new int[numberOfScores];
int max,min;
// Prompt user to enter scores and store them in an array
for (int i = 0; i < scores.length; i++) {
SimpleIO.prompt("Enter score #" + (i + 1) + ": ");
userInput = SimpleIO.readLine().trim();
scores[i] = Integer.parseInt(userInput);
}
//set max and min to 1st score
max=scores[0];
min=scores[0];
for (int i = 1; i < scores.length; i++) {
//and if any are larger than max or smaller than min, make that the new one
if(scores[i]>max)
max=scores[i];
else if(scores[i]<min)
min=scores[i];
}

// Compute sum of scores
int sum = 0;
for (int i = 0; i < scores.length; i++)
sum += scores[i];

// Display average score
System.out.println(" Average score: " +
sum / scores.length);
System.out.println("highest number: "+max); //output largest score
System.out.println("lowest score: "+min); //and smallest score
}
}

Explanation / Answer

yeah delete this ..since u got answer but give me points please.....