I can't see where you are calling the computeRatio() method from main.