Answered step by step
Verified Expert Solution
Link Copied!

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
Please do according to the questions.
image text in transcribed
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 2 Lncs 8056

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013th Edition

3642401724, 978-3642401725

More Books

Students also viewed these Databases questions

Question

Why do we need benefi ts to be measureable?

Answered: 1 week ago