/**
 *  
 * Class GBPEUR takes an amount of money in British pounds 
 * and converts it to Euros.
 *
 * @author  Daniel Burgner
 * @version 1.0
 * @date    03.05.2002
 *
 */
import java.lang.*;

public class GBPEUR implements Conversion {

	/* dGBPEURRate is the conversion rate from British pounds 
	   to Euros. */
	protected double dGBPEURRate;

	/**
	 * Calculates the result in either British pounds or
	 * Euros.
	 * @param  dA - The amount of money to be converted.
	 * @param  bF - The flag determining which conversion.
	 * @return the result of the calculation - a double
	 */
	public double result(double dA, boolean bF) {
		if (bF) {
			return (dGBPEURRate * dA);
		} else {
			return ((1.0 / dGBPEURRate) * dA);
		}
	}

	/**
	 * Creates a new GBPEUR object that takes in the
	 * coordinates of the conversion rate and a flag
	 * indicating a GBP or a EUR currency.
	 * @param dR - the conversion rate.
	 */
	public GBPEUR(double dR) {
		dGBPEURRate = dR;
	}
}
