The class contains: A specific constructor with an appropriate Array List parameter that copies the data from the parameter to the data object within the class itself. A Get Result method that returns an Array List of integers (note the lower case I) that are the bins of the histogram. The value ranges of the bins are set via other methods below. A Runtime Exception is thrown if the histogram is not valid for any reason. Note that a histogram can be valid for zero data elements, but is invalid if the Min Range is greater than the Max Range value below. A method named “SetNumberBins” that sets the number of equal size bins in the histogram. If this method is not called then the default value is 10. ? A method named “GetNumberBins” that returns the current number of bins set. Note that the min and max range values set below are type dependent. Be sure use the correct generic type. ? A method named “SetMinRange” sets the lowest value at which data is included in the lowest bin. Data that is less than this value is not placed in any bin if GetResult is called. The default is negative infinity. A method named “GetMinRange” that returns the current MinRange value. A method named “SetMaxRange” sets the highest value at which data is included in the highest bin. Data that is greater or equal than this value is not placed in any bin if GetResult is called. The default is positive infinity. If a data value falls exactly on the dividing line between two bins, it is placed in the higher value bin. For example, if the data is type integer and two bins range from 0 to 3 and 3 to 6, then a data value of 3 would be placed in the 3 to 6 range bin.
“Struggling with a similar assignment?”
Place an order below and we’ll get it done within the deadline selected.