# Code Samples

  1. Aggregator – The Aggregator class supports static methods for doing various types of aggregation on Numbers. (Numbers is a supplied class that stores a series of real values that can be obtained by calling getNext().) The common aggregations of totalItems(), averageItems(), maxValue() are given as examples of simple looping.
  2. Math – fibonnacciNumber() and isPerfect()
  3. Fraction – The fraction example is now enhanced to simplify the fractional value by finding the greatest common denominator of the fraction's numerator and denominator.
  4. GuessingGame – This example uses a supplied class called SecretNumber, which picks a random whole number between a specific range. An instance of the SecretNumber is passed to the constructor of the GuessingGame, and the GuessingGame's guess() method attempts to get the correct guess within a specified number of tries.
Last updated on: 10/9/2019, 12:27:35 PM