Question: GIVEN THE CODING MAKE THE GRAPH SAMPLE OUTPUT BELOW 31+ import java.util.Scanner;. 5 60 / 7 8 * Working with arrays 9 9 U2A1 =

GIVEN THE CODING MAKE THE GRAPH SAMPLE OUTPUT BELOW

GIVEN THE CODING MAKE THE GRAPH SAMPLE OUTPUT BELOW 31+ import java.util.Scanner;.

5 60 / 7 8 * Working with arrays 9 9 U2A1

= Player Info 10 */ 11 12 public class U2A1 { 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

31+ import java.util.Scanner;. 5 60 / 7 8 * Working with arrays 9 9 U2A1 = Player Info 10 */ 11 12 public class U2A1 { 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 28 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) { int max = val.get(); // storing first value into max variable for(int i = 0; i max) 1/if value of val.get(i) is greater than max then store in our max variable max = val.get(i); return max; } public int getMinValue(int val[]){ int max = val[@]; 1/ storing first value into max variable for(int i = 0; i val) { int max = val.get(); // storing first value into max variable for(int i = 0; i vals) { int n = vals.size(); double avg = 0; for(int i = 0;i bigplays) { int total = 0; for(int i =0;i max_length){ ans = names[i]; max_length = names[i].length(); } } return ans; } }//End Class void graphTotalPoints(String name[], ArrayList totalPoints). Create a very quick Text Graph using Horizontal Bars with X's for Total Points.. Have a Title, then for each Player first list their name followed by X's for each Point and lastly their points above average. Ensure you don't mess up the spacing.. HINT: Find the longest Name. HINT2: Find the Most Wins NOTE1: Points above average is simply the difference to Average Total Points NOTE2: For Spacing since each letter is same spacing use a FOR Loop to Print Extra Spaces after the name to the location of the Total Points. (Do same for After X's) Sample Graph Output String names [4] = new String[] { "Mr Miller", "Joe","Lisa","Jill"); ArrayList totalPoints = new ArrayList (Arrays.asList 4,3,7,4)); Average: 4.5 Sample Graph Player Total Points Points Above Average Mr Miller Joe Lisa Jill XXXX XXX XXXXXXX XXXX - 0.5 1.5 + 2.5 - 0.5

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!