Question
Create a separate java file and a class called as bank account Create variable for the Class BankAccount such as account number balance customer name
Create a separate java file and a class called as bank account
Create variable for the Class BankAccount such as
account number
balance
customer name
phone number
Create getters and setters for each field
Two constructors Null constructor and overloaded constructor
Create two additional methods
To allow customers to deposit funds(this should increment the previous balance field and display the updated balance for that Customer)
To allow the customer to withdraw funds. This should deduct from the balance field, but not allow the withdrawal to complete if insufficient funds exist.(It should display the output after a successful withdrawal and updated balance)
You will want to create various code in the Main class to confirm that your code is working.
There should be a display function that will display the customer balance and last updated 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