java exercise in implementing a media library