Understanding the 'extends' keyword through an example