Package it.unimi.di.prog2.s17
Class HistogramClient
java.lang.Object
it.unimi.di.prog2.s17.HistogramClient
A class to test
Histogram
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
A method to testHistogram.changeBase(Rectangle, int)
.
-
Constructor Details
-
HistogramClient
private HistogramClient().
-
-
Method Details
-
main
A method to testHistogram.changeBase(Rectangle, int)
.Performs the following list of actions:
- reads a list of positive integers from the standard input, for every integer creates a rectangle with base and height given by the integer and adds it to an histogram;
- emits the rectangles in the histogram in the standard output;
- doubles the base of the first added rectangle, and
- emits again the rectangles in the histogram in the standard output.
Given the contract of
Histogram
, this method should always emit twice the same sequence of rectangles.- Parameters:
args
- not used.
-