Question
write a program in java where you Create a class BankAccount with methods to withdraw funds, deposit funds, display account information such as account number
write a program in java where you Create a class BankAccount with methods to withdraw funds, deposit funds, display account information such as account number and balance
The user can open a bank account providing the following information:
-
name and initial balance
-
name only (initial balance set to 0 in that case)
Account number should be assigned in the constructor based on the value in the static field of the class.
Overload the withdraw method with one that also takes a fee and deducts that fee from the account.
Overload the deposit method with one that also takes an interest and increases all the balance in the account by that percent.
After every transaction account number and balance should be displayed.
In the main method, create several BankAccount objects for testing purposes, deposit and withdraw funds from them in all possible ways
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