PPT Slide
int numOfBuckets, bucketSize, buckets[];
public Histogram(int numOfBuckets, int bucketSize) {
this.numOfBuckets = numOfBuckets;
this.bucketSize = bucketSize;
buckets = new int[numOfBucket];
for (int j = 0; j < buckets.length; j++)
public void addData(int data) {
buckets[(data-1)/bucketSize]++;
for (int j = 0; j < numOfBucket; j++) {
System.out.println((j*bucketSize+ 1)+ �-� + ((j+1)*bucketSize)));
for (int k = 0; k < buckets[j]; k++) System.out.print(�*�);