Question
DistributionChart help not sure what to do here import java.util.Scanner; public class DistributionChart { public static void main (String[] args) { int size = 10;
DistributionChart help not sure what to do here
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
List of Source code with comments to Test output listed as comments atthe end of your program. 1. Download DistributionChart java. This driver class executes but is not complete plement the static methods getData and displayChart as indicated. DistributionChart.java create s a chart/histogram so that you ca nspect the frequency distribution of tof values. The program should read n an arbitrary number of integers that are in the range 1 to 100 inclusive. It should then produce a chart that indi icates how many input values fellin the range 1-10, 11-20, 21 30, and so on. Print one asterisk for each value entered. Driver classes tic methods as indi icated in the code skeleton. Entire arrays can be passed into methods and modified. Example output: nter a series of numbers between land lee. separate eac h n umber with a space signal the end by entering a number outside of that range and then press enter chart by see you laterStep 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