Question
JAVA Please follow the instructions. I have provided the code necessary for the main (you can copy paste that). Only the three methods are required.
JAVA Please follow the instructions. I have provided the code necessary for the main (you can copy paste that). Only the three methods are required. Thanks!
Main:
public class ArrayPractice2D {
public static void main(String [] args) {
String [] students = {"Steve", "Arrietty", "Eragon", "Bronte", "Harry", "Odysseus", "Jhumpa", "Ozymandius"};
double [][] grades = {
//Quiz# 1 2 3 4
{94.7, 91.9, 83.7, 89.4 }, // Steve grades
{87.6, 88.1, 81.8, 97.9 }, // Arrietty grades
{86.9, 81.6, 87.3, 93.2 }, // Eragon grades
{83.6, 93.0, 86.7, 83.3 }, // Bronte grades
{89.1, 81.3, 85.3, 97.7 }, // Harry grades
{92.2, 83.7, 92.8, 81.3 }, // Eloise grades
{93.7, 98.2, 97.2, 81.2 }, // Odysseus grades
{86.3, 98.5, 86.5, 88.5 }, // Jhumpa grades
{82.8, 99.2, 96.6, 95.1 } // Ozymandius grades
};
findLowestEach(students, grades);
findHighestEach(students, grades);
calcAverage(students, grades);
}
}
Instructions:
2D Array Practice Today you will practice moving through 2D and 1D arrays simultaneously Th s document is available at: htps://drive.google.com/open?id=177ITCivm3unbJsLdqQOSOMQVxdioF5h7Vc9w07-eb4 Step 1: Create a new class ArrayPractice 2D Step 2: Copy and paste this into your class: public static void main(String [] args) { String [] students - "Steve", "arrietty", "Eragon", "Brante", "Eleccy", Eloise". *Odysseus", "Jhumpa", "Ozymandius"); double ut eodes - // Quiz 1 3 94.7, 91.9, 83.7, 89.4 , // Steve grades 87.5, 88.1, 81.8, 97.9 1. // Arrietty grades (86.9, B1.6, 87.3, 93.2 h. // Eragon grades (83.6, 93.0, 86.7, 83.3 } // Bronte grades 189.1, 1.3, 85.3, 97.7 . // Harry grades (92.2, 83.7, 92.8, 81.3 }, // Eloise grades 93.7, 98.2, 97.2, 81.2 }, // Odysseus guedes {86.3, 98.5, 86.5, 88.5 }, // Jhumpa grades 82.8, 99.2, 96.5, 95.1 } // Ozymendius grades #; FindLowestEach students, grades); findRighestBach (students, grades); calcaverage students, grades); , In main, there are two arrays, students, and grades. students is a one dimensional array with the student names. grades is a two dimensional array. The ons represent the students, the scores each student got on a quiz So grades[0][0] is Steve's quiz 1 grade. grades[0][1] is Steve's quiz 2 grade. etc. You are going to create three melhods that traverse these arrays. Methods: find LowestEach. Th s method takes the two arrays, students and grades as parameters. It walks through the arrays and prints the lowest score for each student (see sample output below). find HighestEach. This method takes the two arrays, students and grades as parameters. It walks through the arrays and prints the lowest score for each student (see sample output below) calcAverage Th s method takes the two arrays, students and grades as parameters. It walks through the arrays and average score for each student (see sample output belon). Expected Output: Steve's lowest score is: 83.7 Arrietty's lowest score is: 81.8 Eragon's lowest score is: 81.6 Bronte's lowest score is: 83.3 Harry's lowest score is: 81.3 Elolse's lowest score is: 81.3 Odysseus's lowest score is: 81.2 Jhumpa's lowest score is: 86.3 Ozymandius's lowest score is: 82.8 Steve's highest score is: 94.7 Arrietty's highest score is: 97.9 Eragon's highest score is: 93.2 Bronte's highest score is: 93.0 Harry's highest score is: 97.7 Eloise's highest score is: 92.8 Odysseus's highest score is: 98.2 Jhumpa's highest score is: 98.5 Ozyrnandius's highest score is: 99.2 Steve's average score is: 89.92500000000001 Arrietty's average score is: 88.85 Eragon's average score is: 87.25 Bronte's average score is: 86.65 Harry's average score is: 88.35 Eloisa's average score is: 87.5 Odysseus's average score is: 92.575 Jhumpa's average score is: 89.95 Ozymandius's average score is: 93.42500000000001
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started