Currency Conversion Algorithm In Java