Question: Given this code Code these Methods 29 30 10 import java.util.Scanner;0 5 60 /* 7 1 8 Working with arrays 9 U2A1 = Player Info

Given this code

Given this code Code these Methods 29 30 10 import java.util.Scanner;0 5

60 /* 7 1 8 Working with arrays 9 U2A1 = Player

Info 10 */ 11 12 public class U241 { 13 140 public

static void main(String[] args) { 15 16 String[] name = new String[5];

Code these Methods

//Initializing the Name array for storing names 17 int[] score = new

29 30 10 import java.util.Scanner;0 5 60 /* 7 1 8 Working with arrays 9 U2A1 = Player Info 10 */ 11 12 public class U241 { 13 140 public static void main(String[] args) { 15 16 String[] name = new String[5]; //Initializing the Name array for storing names 17 int[] score = new int[5]; //Initializing the score array for storing scores 18 ArrayList plays = new ArrayList(); //Initializing the ArrayList for Big Plays 19 20 Scanner sc = new Scanner(System.in); 21 System.out.println("Enter names of 5 players"); 22 /*Storing the 5 names*/ 23 for(int i = 0; i max) //if value of val[i] is greater than max then store in our max variable max = val[i]; } return max; } /*getMaxValue(ArrayList val) for finding maximum value of Big Plays */ public int getMaxValue(ArrayList val) { 90 System.out.println("Least Big Plays : "+minPlays); 91 92 93 }//End main 94 95 /*getMaxValue(int valll) for finding maximum value of scores */ 960 public int getMaxValue(int val[]){ 97 int max = val[0]; 1/ storing first value into max variable 98 for(int i = 0; i max) //if value of val[i] is greater than max then store in our max variable 101 max = val[i]; 102 } 103 return max; 104 } 105 106 107 /*getMaxValue(ArrayList yal) for finding maximum value of Big Plays */ 1080 public int getMaxValue(ArrayList val) 109 { 110 int max = val.get(); // storing first value into max variable 111 for(int i = 0; i max) //if value of val.get(i) is greater than max then store in our max variable 114 max = val.get(i); 115 116 return max; 117 } 118 1190 public int getMinValue(int val[]){ 120 int max = val[0]; 1/ storing first value into max variable 121 for(int i = 0; i val) 130 { 131 int max = val.get(); // storing first value into max variable 132 for(int i = 0; i sortValues(ArrayList vals) returns a NEW ArrayList with Sorting the wins from Lowest to Highest. To do this you will create a new int [] array, copy the values into sortedVals[] and using nested FOR Loops. (Do NOT use Arrays.sort(). Use nested Loops) double average(int val[]) returns the average. Used for Average Score double averagel ArrayList vals ) returns the average. Used for Average Big Plays ArrayList vals totalPoints(int scores[], ArrayList big Plays ) returns the Total Points. Each Score is worth 1 point each Big Play is worth 2 points. String longestName(String names[]). Return the longest name

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!