Backend Advanced C++: Fix Polymorphism Code