/**
 * An implementation of a currency converter
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class CurrencyConverterImpl implements CurrencyConverter
{

    /**
     * Convert between currencies (required by CurrencyConverter)
     *
     * @param amount  The amount of "from" currency to convert
     * @param from    The "from" currency
     * @param to      The "to" currency
     * @return        The equivalent amount of "to" currency (or -1)
     */
    public double convert(double amount, String from, String to)
    {
       double        value;

       value = -1.0;
       if (from.equals("USD") && to.equals("GBP")) 
       {
          value = amount / 1.9;
       }


       return value;
    }

}
