Question: java solve for this problem Problem#1 Create a Banking System, where a user can create new account, deposit money, withdraw money and check the balance

 java solve for this problem Problem\#1 Create a Banking System, where

java solve for this problem

Problem\#1 Create a Banking System, where a user can create new account, deposit money, withdraw money and check the balance of his/her account. What you need to do: 1) Create a BankAccount class which has 3 instance variables; name, accNum and balance. a. Create a constructor with 3 arguments and initialize the attributes. The class also has the following 4 methods; b. void deposit(double depAmount) - Inside the method the balance variable needs to be increased by the "depAmount" amount. c. void withdraw(double withAmount) - The balance is decreased by "withAmount" amount. We have to make sure the balance does not become negative. d. double getBalance() - The method returns the balance. e. void display() - This method displays the attributes in the format "Name:[name]; AccNum:[accNum]; Balance:[balance]". Use toString() method to get the formatted string. 2) Now create an application class (that has the main method) named "Bank" which will have the main method. In the main method, you need to create an account first. So, take input for the 3 fields (name, accNum, balance) from the user. After taking the input, create a BankAccount object. - After creating the account, you have to provide a menu on the console. It will take user input to decide what action to take

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!