/* Author: James Tam Version: 2015 Learning objectives: example application of the Singleton design pattern. */ public class DriverSingleRandom { public static void main (String [] args) { SingleRandom aSingleRandom = SingleRandom.getInstance(); aSingleRandom.setSeed(1); for (int i = 0; i < 10; i++) System.out.println(i + ": " + aSingleRandom.nextInt()); System.out.println(); } }