I have created v1 of the java code. I still need to test it.
the java compiler was recognizing longs and ints. I chaged the longs to doubles to allieviate the problem. I then fixed a mis-spelled variable which fixed the program making it work.
I added the Java class file for those who want it