Class inheritance exercise