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

public class EURAUD implements Conversion {

	/* dEURAUDRate is the conversion rate from Euros 
	   to Australian dollars. */
	protected double dEURAUDRate;

	/**
	 * Calculates the result in either Euros or
	 * Australian dollars.
	 * @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 (dEURAUDRate * dA);
		} else {
			return ((1.0 / dEURAUDRate) * dA);
		}
	}

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