123 Bob 100 92a-44-33 Kathy Emerson 0
Next, implement the method that accepts a deposit.
Deposits will be expressed in cents.
The method will have one parameter, the number of cents to be added to
the balance.
The method will not return a value, so its return type will be void
.
class CheckingAccount { // instance variables String accountNumber; String accountHolder; int balance; //constructors . . . . // methods . . . . void ________________ ( int________________ ) { balance = ___________ + __________ ; } }
Since the return type of the method is void
,
no return
statement is needed.
When the method is run,
it will automatically return to the place where it was called from
after the last statement of the method is executed.