Created CPPtoJava comparison test

Created a test that compares Java output with C++ output
Fixed some bugs in other files