Exercise on inheritance