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() );
}
. . .
}