CurrencyConverter.java 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. public class CurrencyConverter {
  2. public double dollarToEuro(double dollar){
  3. return dollar * .94;
  4. }
  5. public double euroToDollar(double euro){
  6. return euro * 1;
  7. }
  8. public double euroToBritishPound(double euro){
  9. return euro * .82;
  10. }
  11. public double britishPoundToIndianRupee(double britishPound){
  12. return britishPound * 68.32;
  13. }
  14. public double rupeeToCanadianDollar(double rupee){
  15. return rupee * 1.32;
  16. }
  17. public double canadianDollarToSingaporeDollar(double canadianDollar){
  18. return canadianDollar * 1.43;
  19. }
  20. public double singaporeDollarToSwissFranc(double singaporeDollar){
  21. return singaporeDollar * 1.01;
  22. }
  23. public double swissFrancToMalaysianRinggit(double swissFranc){
  24. return swissFranc * 4.47;
  25. }
  26. public double malaysianRinggitToJapaneseYen(double malaysianRinggit){
  27. return malaysianRinggit * 115.84;
  28. }
  29. public double japaneseYenToChineseYuanRenminbi(double japaneseYen){
  30. return japaneseYen * 6.92;
  31. }
  32. }