Exercise with inheritance.