sealed classes and interfaces example