Implementing inheritance and playing with recursion exercises