Java - library software assignment