Primary class Money.

Power Java
Dynamic Proxy Classes:
Toward Metalevel Programming in Java

Mathias Richter and Takashi Suezawa
Listing 2. Primary class Money.


public class Money implements IMoney
{
	private String fCurrency;
	private double fAmount;

	public Money( String isoCurrency, double amount )
	{
		setCurrency( isoCurrency );
		setAmount( amount );
	}

	public void setCurrency( String isoCurrency )
	{
		fCurrency = isoCurrency;
	}

	public String getCurrency()
	{
		return fCurrency;
	}

	public void setAmount( double amount )
	{
		fAmount = amount;
	}

	public double getAmount()
	{
		return fAmount;
	}
}