Practice 6: ineritance and composition: fixed in accordance with the
comments