Ok, so I've been challanged to find the issue. I've pulled the code into Eclipse and redone it a little. But first the problem.
In the code:
you are getting the interest. However, if you look further up the code:
you'll notice that the balance is never set with a "setB". Therefore, the balance is always zero.
You are trying to calculate the interest in two different ways. The first is in the customer class and the second is in the Person class. I'd just use the Person class one and change the first code set to:
Another question you asked was related to variables vs. methods. Your current code:
can be one of two ways:
or
In this way you have used the built in variable "this" to eliminate any confusion as to which "name" you mean in the setter. Some people swear by the second method but I feel that it is a matter of preference.