// Project: Classes // Module: counter // Source code file Test1.java // Implement a Counter class that counts persons, animals, // items on an assembly line, etc. // Test1 is a traditional test file for Counter class. public class Test1 { public static void main(String[] args) { Counter ctr = new Counter( ); System.out.println(ctr); System.out.println(ctr.getCurrentCount( )); ctr.incrementCount( ); System.out.println(ctr.getCurrentCount( )); for(int i = 1; i <= 1000; i++) { ctr.incrementCount( ); } System.out.println(ctr.getCurrentCount( )); ctr.reset( ); System.out.println(ctr.getCurrentCount( )); } }