|
|
| BankAccount.java |
/**
* Deposit the given amount onto the account.
*
* @param amount Amount of money to be deposited in cents.
*/
public void deposit(int amount) {
balance += amount;
}
|
![]() | In the next step, the methods can be filled out with
the instructions to perform the specified tasks.
|
![]() | In case of mutators, some well-defined state change
is performed.
|
![]() | Accessors derive some value directly or indirectly
from the instance variables and return it.
|
|
| Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 11, 2002 |