private double rate(Currency currency, Currency currency2){
        switch (currency.toString()){
            case "Euro": if (currency2.toString()=="Dolar") return 1.1;
                else if(currency2.toString()=="Libra") return 0.8;
            case "Dolar": if (currency2.toString()=="Euro") return 0.9;
                else if(currency2.toString()=="Libra") return 0.5;
            case "Libra": if (currency2.toString()=="Dolar") return 2;
                else if(currency2.toString()=="Euro") return 1.25;
            default: return 0;
        }
    }