Java 1.5 Program Design