edu.cuny.cat.core
Class Account
java.lang.Object
  
edu.cuny.cat.core.Account
- All Implemented Interfaces: 
 - edu.cuny.obj.Resetable
 
public class Account
- extends java.lang.Object
- implements edu.cuny.obj.Resetable
  
A moneytary account that can be owned by a trader or specialist.
- Version:
 
  - $Revision: 1.14 $
 
- Author:
 
  - Jinzhong Niu
 
 
 
| 
Method Summary | 
 double | 
getBalance()
 
            | 
 void | 
payFund(java.lang.String type,
        java.lang.String receiverId,
        double amount)
 
            | 
 double | 
payFundAvailable(java.lang.String type,
                 java.lang.String receiverId,
                 double amount)
 
          transfers fund up to the amount available in the account or the requested
 amount, whichever is smaller. | 
 void | 
receiveFund(java.lang.String type,
            java.lang.String payerId,
            double amount)
 
            | 
 void | 
reset()
 
            | 
 void | 
setBalance(double balance)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
TRANSACTION_FEE
public static final java.lang.String TRANSACTION_FEE
- See Also:
 - Constant Field Values
 
REGISTRATION_FEE
public static final java.lang.String REGISTRATION_FEE
- See Also:
 - Constant Field Values
 
SHOUT_FEE
public static final java.lang.String SHOUT_FEE
- See Also:
 - Constant Field Values
 
INFORMATION_FEE
public static final java.lang.String INFORMATION_FEE
- See Also:
 - Constant Field Values
 
PROFIT_FEE
public static final java.lang.String PROFIT_FEE
- See Also:
 - Constant Field Values
 
GOODS
public static final java.lang.String GOODS
- See Also:
 - Constant Field Values
 
ASSETS
public static final java.lang.String ASSETS
- See Also:
 - Constant Field Values
 
EXPENSE
public static final java.lang.String EXPENSE
- See Also:
 - Constant Field Values
 
INCOME
public static final java.lang.String INCOME
- See Also:
 - Constant Field Values
 
balance
protected double balance
Account
public Account()
reset
public void reset()
- Specified by:
 reset in interface edu.cuny.obj.Resetable
 
 
receiveFund
public void receiveFund(java.lang.String type,
                        java.lang.String payerId,
                        double amount)
 
 
payFundAvailable
public double payFundAvailable(java.lang.String type,
                               java.lang.String receiverId,
                               double amount)
- transfers fund up to the amount available in the account or the requested
 amount, whichever is smaller.
 
- Parameters:
 type - describes the type of this transferreceiverId - amount - the amount requested
- Returns:
 - the amount actually transferred
 
 
 
payFund
public void payFund(java.lang.String type,
                    java.lang.String receiverId,
                    double amount)
 
 
getBalance
public double getBalance()
 
 
setBalance
public void setBalance(double balance)