examples of classes and interfaces using polymorphism