Java program for IST256 final assignment