Multiple and Repeated Inheritance in C++ and Java