added encapsulation and polymorphism homework