Added a switch for running C++ versus Java code