Question: Question 2 [ 3 8 marks ] You are tasked with writing a Java program to create a basic banking application that allows users to
Question
marks
You are tasked with writing a Java program to create a basic banking application that allows users to perform operations such as depositing money, withdrawing money, and displaying account information.
Use the following guidelines to complete the assessment:
Create a BankingApplication class with the following instance variables:
tableaccountHolderNameString,tableTo store the name ofthe account holder.accountNumberint,tableTo store the accountnumberbalanceint,tableTo store the currentbalance in the account.
HSYDJulDecSARRV
Implement methods within the BankingApplication class to perform the following operations:
tabledepositint amount,This method should allow the user to deposit a specified amount into the account. Ensure that the amount is greater than zero, and if so update the balance accordingly.withdrawint amount,This method should allow users to withdraw a specified amount from the account. Check whether the amount to withdraw is greater than zero and less than or equal to the current balance. If so deduct the amount from the balance.displayAccountInfoThis method should display the account holder's name, account number, and current balance.
In the program's main method, create an instance of the BankingApplication class with some initial values for the account holder name, account number, and initial balance.
Implement a menudriven interface that allows the user to choose from the following options:
Deposit
Withdraw
Display Account Information
Exit
Use a loop to repeatedly display the menu and prompt the user for their choice
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
