skip to Main Content

This assignment will utilize the file that contains the BankAcc

This assignment will utilize the file that contains the BankAccount class. Step 1: *Modify the withdraw method to include error checking if someone tries to withdraw an amount greater than the account balance. Step 2: Create an program to simulate an ATM in a separate ATM class that contains a main method, the file will be called This program will use objects of the BankAccount class. In main, we will first create an new BankAccount object, with an initial balance of your choice. You can then ask the user to enter a pin to get into the menu. (If the pin is incorrect, the user will be asked to re-enter. If the user enters the incorrect pin three times, the program will exit.) Display a menu that includes the following options: 1 – View Balance, 2 – Make a Deposit, 3 – Withdraw Cash, and 4 – Exit These options will call methods on the BankAccount object. For the “View Balance” option, simply display the current account balance. For the “Make a Deposit” and “Withdraw Cash” options, your program will ask the user to enter an amount, and then display the updated balance. *Use if statements or a switch statement to run the selected menu options. If someone enters an invalid option, display an error message. The menu will repeat until the user enters 4 to exit. [will need a do while or while loop to repeat the menu] *Include error checking for: a negative amount to deposit or withdraw. (If there is an error, display an error message, such as: “Amount cannot be negative” and allow the user to enter the value again [use a do…while loop].)


Clicking on this button will take you to our custom assignment page. Here you can fill out all the additional details for this particular paper (grading rubric, academic style, number of sources etc), after which your paper will get assigned to a course-specific writer. If you have any issues/concerns, please don’t hesitate to contact our live support team or email us right away.

Back To Top