previous | start | next

Example: An Automatic Teller Machine - Method Documentation

ATM Class Method Documentation

public class ATM
{
   /**
      Gets PIN from keypad, finds customer in bank.
      If found sets state to ACCOUNT, else to START.
   */
   public void selectCustomer()
   {
   }


   /**
      Sets current account to checking or savings. Sets
      state to TRANSACT
      @param account one of CHECKING_ACCOUNT or SAVINGS_ACCOUNT
   */
   public void selectAccount(int account)
   {
   }


   /**
      Withdraws amount typed in keypad from current account.
      Sets state to ACCOUNT.
   */
   Public void withdraw()
   {
   }


   /**
      Deposits amount typed in keypad to current account.
      Sets state to ACCOUNT.
   */
   Public void deposit()
   {
   }


   /**
      Sets state and updates display message.
      @param state the next state
   */
   public void setState(int newState)
   {
   }
}



previous | start | next