Java inheritance practice 2