This program is comprised of three parts.
main.java CTranslator.java PTranslator.java
To run this program you need to have the java or cpp code that you want to translate in the same folder as this program. Future versions of this will include a way to translate programs from a specified path.
Once the program you wish to translate is in the same folder, compile main.java by typing "javac main.java" in the terminal. After this you run the program by typing "java main" and it will automatically compile the other two programs. You will be prompted to type in the name of the file to translate. Once you input this command it will show you the new translation on the terminal and will create a new program for whichever language you translated the desired program to.
Note If you input a Java program it will automatically translate to cpp and vice versa For instance, inside there is a program to showcase for loops in cpp, if you run the program you can see how it works.
If a program already exists for the desired language to translate, it will automatically delete and recreate the specified program for you. This means if you run it again with the for loops regardless of whether you choose cpp or java, it will delete and recreate the program you are translating to.
Hope that this program helps!