An implementation must be provided for every method of the class. The implementation for three methods of the CheckingAccount
class is given below.
public class CheckingAccount
{
private double myBalance;
private String myAccountNumber;
public double getBalance()
{
return myBalance;
}
public void deposit( double amount )
{
myBalance = myBalance + amount;
}
public void withdraw( double amount )
{
myBalance = myBalance - amount;
}
}