inheritance and abstraction homework