java app mimicking week 1