/**
 *  
 * Class CAD takes an amount of money and converts it to
 * Canadian dollars.
 *
 * @author  Daniel Burgner
 * @version 1.0
 * @date    02.15.2002
 *
 */
import java.lang.*;

public class CAD implements Conversion {

	/* dCADRate is the conversion rate to Canadian dollars. */
	protected double dCADRate;

	/**
	 * Calculates the result in Canadian dollars.
	 * @param  nA - The amount of money to be converted.
	 * @return the result of the calculation - a double
	 */
	public double result(double dA) {
		return (dCADRate * dA);
	}

	/**
	 * Creates a new CAD object that takes in a String
	 * representing the string value of the conversion
	 * rate.
	 * @param strR - The string representation of the
	 *               conversion rate.
	 */
	public CAD(String strR) {
		dCADRate = Double.valueOf(strR).doubleValue();
	}
}
