Question: in java programing language pls help me thanks [Q.1] Define an interface BankAccount with the following methods: a. deposit ( double amount) adds an amount
![in java programing language pls help me thanks [Q.1] Define an](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f31bf7cee4b_43966f31bf71fdfd.jpg)
in java programing language pls help me thanks
[Q.1] Define an interface BankAccount with the following methods: a. deposit ( double amount) adds an amount to the balance b. withdraw (double amount) subtracts an amount from balance C. getBalance ) returns the balance Then, write the class StandardAccount that implements BankAccount with encapsulated attribute called balance that shows the balance amount in a standard bank account. This class has the following methods: a. transfer ( BankAccount account, double amount) transfers the amount from this object to account object. You should reuse the methods defined above. tostring () returns all the information regarding this account. rite the class CheckingAccount that implements BankAccount with encapsulated b. attributes along with balance: 1. transactionCount which counts how many transactions occurred 2. Constant integer FREE_TRANSACTIONS which is initialized to 3 3. Constant double TRANSACTION FEE which is initialized to 2.0 This class has the following methods: a. transfer ( BankAcco unt account, double amount) transfers the amount from this object to account object. You should reuse the methods defined above deductFees () deduct fees from the balance if the number of transactions exceed the number of free transactions c. toString ( ) returns all the information regarding this account Then, write BankTest class that creates two bank accounts: one for standard account and other for checking account with initial balance $500.00 and $200.00 respectively that have been input from the user. Then, implement the following transactions: Transfer $100.00 from standard account to checking account 2- 1- Deposit $300.00 to checking account 3- Withdraw $500.00 from the standard account 4- Transfer $150.00 from checking account to standard account Deposit-$100.00 to standard account 5- Last, print all the accounts information before your program terminates. Make sure all the double precision formats are correct
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
