assignment 3 on objects and inheritance