Bank interest calculator

Bank interest calculator

The actual bank program is in the video below;

While the public or run method for this is below;

I got cut off at the end but i was going to say it works. To test the compound method just use amount=2, years =2, false for the answer to the simple or compound formula question and interest rate of .5 and it should equal 4.5 because 2*(1.5) = 3, and 3 * 1.5= 4.5, so the compound method also works.
Although the problem with this program is that it may not work very well with large numbers depending on what you are running it on so be careful about that.

Keep in mind there are always several of ways to do a program, the way I did it may not be the way you would’ve done it.