Lecture 1
9
Send object a message
Bank.java (lines 101ff)
•
•    
 while ( moreTransactions ) {
         . . .
    String command = atm.readWord( "transaction: " );
    ...
    else if ( command.equals( "deposit" ) ) {
  int amount = atm.readInt( "amount: " );
  account.deposit( amount );
    }
    ...
    else if ( command.equals( "balance" ) ) {
  atm.println( account.getBalance() );
    }
    . . .
}
object  dot  message ( information )