Question: I need help with the code. I attached code here import java.util.Scanner; public class DistributionChart { public static void main (String[] args) { int size

I need help with the code. I attached code here
 I need help with the code. I attached code here import
import java.util.Scanner;
public class DistributionChart
{
public static void main (String[] args)
{
int size = 10;
int[] ranges = new int[size]; // each entry represents a range of values
getData(ranges); //pass the entire array into the method
displayChart(ranges);
System.out.println(" See you later!!");
} //end of main
public static void getData(int[] someArray)
{
Scanner scan = new Scanner (System.in);
System.out.println ("Enter a series of numbers between 1 and 100. Separate each number with a space.");
System.out.println ("Signal the end by entering a number outside " +
"of that range and then press enter.");
System.out.print("Go: ");
//reads an arbitrary number of integers that are in the range 1 to 100 inclusive
//for each integer read in, determine which range it is in and increment the corresponding element in the array
//your code goes here
scan.close();
}//end of getData
public static void displayChart(int[] someArray)
{
//Print chart title with your name
//Print histogram.
} //end of displayChart
}// end of DistributionChart tester class
/* Example output.
*/

Please adhere to the Standards for Programming Assignments and the Java Coding Guidelines. Submit the following List of source code with comments to document * Test output listed as comments at the end of your program. 1. 2. Download DistributionChart.java. This driver/tester class executes but is not complete. Implement the static methods getData and displayChart as indicated. DistributionChart.java creates a chart/histogram so that you can visually inspect the frequency distribution of a set of values. The program should read in an arbitrary number of integers that are in the range 1 to 100 inclusive It should then produce a chart that indicates how many input values fell in the range 1 10, 11 20, 21 - 30, and so on. Print one asterisk for each value entered Notes: Driver classes have static methods as indicated in the code skeleton. Entire arrays can be passed into methods and modified. Example output: Enter a series of numbers between 1 and 10. Separate each number with a space Signal the end by entering a number outside of that range and then press enter Go: 1 2 3 40 50 60 70 80 9 11 22 33 44 55 66 77 88 99 1 31 31 45 98 99 100 5ee Distribution Chart by PBaker 1-10 11-20 I* 21-30 I* 31-40** 41-50 I** 51-60 ** 61-70 ** 71-80 ** 81-90 * 91-100 |** See you later

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!