Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Programming Please do according to the questions. B. A histogram is used to plot tabulated frequencies. Create a Histogram class that can be used
Java Programming
B. A histogram is used to plot tabulated frequencies. Create a Histogram class that can be used to maintain and plot the frequencies of numbers that fall within a specified range. The Histogram class contain will an array of counters with equal intervals within the specified range (For example, see Test 1 and Test 2). All counters are first initialized to zero. When the number added to the Histogram falls within the range of a particular counter that counter is incremented by one. The Histogram class should contain the following methods: A constructor that accepts the number of counters and the maximum and minimum limits of the numbers (i.e., the range of numbers). .A second constructor that accepts the maximum and minimum limits of the numbers and initializes the Histogram with 10 counters for the specified range. An add(double x) method that increments the corresponding counter. . A reset) method that sets all counter frequencies to zero. .A plotFrequency method that plots the counter frequencies. A plotCumulative method that plots the cumulative frequencies. Write a RandomNumberTester class that uses the Histogram class to test the Random numbetr class provided in the java SDK. Test 1: Create 10 counters with the following limits Bin Counter 0 Counter 1 Counter 2 Counter 3 Counter 4 Counter 5 Counter 6 Counter 7 Limit 0 Please do according to the questions.
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