a simple java program for a class project