Use dynamic method dispatch

http://ideone.com/5mQ9ES