Question
java: bank: PLEASE HELP!!!! Part A. A bank needs programs that can compute the customers account balance after deposit, after withdrawal, and after interest for
java: bank:
PLEASE HELP!!!!
Part A.
A bank needs programs that can compute the customers account balance after deposit, after withdrawal, and after
interest for their savings, checking, and loan accounts.
Task 1. Create three classes:
Savings, Checking, Loan
Task 2. In class Savings account, create three void methods (Deposit, Withdrawal, and Interest):
-To compute balance after deposit(the method takes deposit amount: double depositAmount; the current balance
is stored in a variable: double balance. The method updates the value in this variable by adding the deposit amount to its original value).
-To compute balance after withdrawal (the method takes withdrawal amount: double withdrawalAmount). The method to updates the balance by subtracting the withdrawal amount to its original value.
-To compute balance after interest (the method takes interest rate : double interestRate). The method updates the balanc by adding the interest amount to its original value.
Task 3. Add a class variable to store customers name: String name.
Task 4. Call the methods to compute and display the Savings account balances:
Note: To make the code more readable, use a different object for each customer to identify the customer. Display customers names and their balances
a. Customer John Doe: Initial balance = $100, deposit = $35, withdrawal = $55, interest = 3%,
b. Customer Sam Simms: Initial balance = $500, deposit = $250, withdrawal = $150, interest = 3%
Task 5. It turns out that the name of the first customer is Jon Dole, not John Doe. Change the first customers name and redisplay his name and his balance
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started