Class HistogramClient

java.lang.Object
it.unimi.di.prog2.s17.HistogramClient

public class HistogramClient extends Object
A class to test Histogram.
  • Constructor Details

    • HistogramClient

      private HistogramClient()
      .
  • Method Details

    • main

      public static void main(String[] args)
      A method to test Histogram.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.