magomar
2/16/2015 - 5:01 PM

Model of the CurrencyConverterLite JavaFX app

Model of the CurrencyConverterLite JavaFX app

package currencyconverter.app;

public enum Currency {
    USD("U.S. Dollar", 1.0),
    GBP("British Pound", 1.56285),
    EUR("Euro", 1.22293);
 
    private double dollarConversionRate;
 
    private String fullName;

    Currency(String fullName, double dollarConversionRate) {
        this.dollarConversionRate = dollarConversionRate;
        this.fullName = fullName;
    }

    public double getDollarConversionRate() {
        return dollarConversionRate;
    }

    public String getFullName() {
        return fullName;
    }

    public String getShortName() {
        return name();
    }

}