Question: Java coding ArrayOfExamScores import java.util.Scanner import java.util. Random; public class ArrayofExamScores { // The main method public static void main(String[] args) { // Get from

Java coding ArrayOfExamScores

Java coding ArrayOfExamScores import java.util.Scanner import java.util. Random; public class ArrayofExamScores {// The main method public static void main(String[] args) { // Get

from the keyboard, an integer, and save it into // the variablenumstudentsInclass. // You've done this many times before. // Be sure to

import java.util.Scanner import java.util. Random; public class ArrayofExamScores { // The main method public static void main(String[] args) { // Get from the keyboard, an integer, and save it into // the variable numstudentsInclass. // You've done this many times before. // Be sure to ask the user, using a System.out.print statement, // "How many students are in the class? ". // Create a reference variable, named arrayofTestScores, // of type int[]. Create a new array that has as many integers // as the value that is saved in the variable numStudentsInclass. // You can do this using two statements. Either use two statements, // or use a single statement that achieves the same task. For // example, if you wanted to create an array of 15 integers: // int numStudentsInClass = 15; w int[] arrayofTestscores; // arrayofTestscores = new int[numstudentsInclass]; // or // int numStudentsInclass = 15; // int[] arrayofTestScores = new int[numStudentsInClass]; // Into each of the positions in the array named arrayoftest scores, // place a randomly generated integer between 0 and 100. To do this, you // need to access each entry of the array, which has been initialized // to hold all zeros. You can complete this task by using a for loop. // For example if you had an array called myArray, // that had 5 entries that looked like the following, where the index // below a box indicates the index number of the array (and is here the // number of the student) : // myArray : | 7| 6 | 9 | 5 | 8 | // index : // you could iterate over the array using the following for loop, and // place the number 12 into each position: // for (int i -e; i maximumscore) { maximumScore - arrayoftest scores[i]; maximumScoreStudent - 1+1; 11 1/ After you've determined the maximumScore and maximumScoreStudent, // use a System.out.println statement to print that value to the // screen. }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!