The final programming in java assignment