1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import java.text.DecimalFormat;
- public class CurrencyConverter {
-
- public static double ConvertDollarToEuro(double dolla){
- DecimalFormat aaa = new DecimalFormat("##.00");
-
- return Double.valueOf(aaa.format(dolla * 0.94));
- }
-
- public static double EuroToDollar(double euro){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(euro * 1));
- }
-
- public static double EuroToBritishPound(double euro){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(euro * 0.82));
- }
-
- public static double BritishPoundToRupee(double britishPound){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(britishPound * 68.32));
- }
-
- public static double RupeeToCanadianDollar(double ruppee){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(ruppee * 1.32));
- }
-
- public static double canadianToSingapore(double canadianDollar){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(canadianDollar * 1.43));
- }
-
- public static double SingaporeToSwiss(double singapore){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(singapore * 1.01));
- }
-
- public static double SwissToMalaysian(double Swiss){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(Swiss * 4.47));
- }
-
- public static double MalaysianToJapaneseYen(double malaysian){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(malaysian * 115.84));
- }
-
- public static double JapaneseYenToChinese(double japan){
- DecimalFormat df = new DecimalFormat("##.00");
- return Double.valueOf(df.format(japan * 6.92));
- }
-
- }
|