University Java Lab exercise 1