OOP with C++ for simulation