public class ThrottleDemo { public static void main (String[] args) { final int SIZE = 8; Throttle t1 = new Throttle(SIZE); Throttle t2 = new Throttle(SIZE*2); Throttle t3 = new Throttle(); t1.shift(4); t2.shift(10); t3.shift(10); printThrottle(t1, "T1"); printThrottle(t2, "T2"); printThrottle(t3, "T3"); } static void printThrottle(Throttle t, String name) { System.out.println("Throttle " + name + " is set at " + t.getFlow() + " flow rate."); } }