Answer:
voidA Method to Get the Balance
Here is the class definition, again:
class CheckingAccount
{
// instance variables
String accountNumber;
String accountHolder;
int balance;
//constructors
. . . .
// methods
}
Let us work on a method that will return the current balance. When it is called, it will not alter any data in a checking account object, but will merely return the current balance.
QUESTION 11:
Write the first line of the "current balance" method. The method will not use any parameters. You will have to think of a name for the method.