Encapsulation and Polymorphism homework