Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create the ATM application that implements the following functions: Deposits to one of the accounts (saving, checking) Wthdraws from one of the accounts (saving,
Create the ATM application that implements the following functions: Deposits to one of the accounts (saving, checking) Wthdraws from one of the accounts (saving, checking) Displays the balances Writes a new balance to a log file each time the transaction completed succesfully The form is made of multiple pages (by using TabControl) and looks like shown below: ATM Checking Savings Amount: Select Action Deposit Withdraw Submit Balance Clear Exit X Programmed by Firstname Lastname ATM Checking Savings Transaction Type O Deposit O Withdraw Amount: a. Submit b. 2. Deposit and Withdraw C. Balance Implementation Requirements 1. Include all the user interface conveniences Clear Exit a. keyboard access keys; b. AcceptButton (to work with Submit) and CancelButton (to work with Clear); c. setting the tabs for natural tabbing order and opening with focus in Amount text box; d. resetting the focus in Clear. Programmed by Firstname Lastname X There are four methods that are not event handlers: to deposit to checking; to withdraw from checking; to deposit to saving; to withdraw from saving. Radio Buttons in a Group Box are used for a transaction type (Deposit, Withdraw). Those methods check that: the user entered a number into the text box for the amount. Use Try/Catch (or TryParse) for this. the number entered was positive. An If statement is used to do this. If the user did not enter a correct value, a message box should pop up instructing the user to enter a positive number. Also, the Clear () method should be called whenever a message box is displayed with an error, so that the user can restart entering values: textBoxName.Clear(). Withdraw has to check that there are sufficient funds in whichever account is being withdrawn from. Again, if not, display an appropriate message box and call Clear (). DO NOT SUBTRACT ANYTHING FROM THE ACCOUNT IF THERE ARE INSUFFICIENT FUNDS AND DO NOT CHANGE THE BALANCES. Try/Catch can be used to check for nonnumeric or blank text. d. All checks in these methods that are done with if statements should be done with a series of nested if statements. If more than one message box pops up, you've done the checks one after another instead of nesting them. e. If the transaction (deposit, withdraw) was completed successfully then write the message to the file, e.g., "Deposited: $xx.xx New balance: $xx.xx". Hint: think about using class-level variables (balances, file objects) 3. Balance label Create a method DisplayBalances () which is not an event handler. a. DisplayBalances () will display both balances in the labels created for this purpose. The balances should be formatted as currency before being displayed. b. If all the checks are completed satisfactorily, Deposit and Withdraw change the balances according to the user's choice and call DisplayBalances () from within their methods to display the balances. In other words, instead of writing the code to display the balances again at the end of Deposit and Withdraw, just call the DisplayBalances () 4. Submit button a. Once the user has made a valid entry, then Deposit and Withdraw check that the user has chosen one of the radio buttons and, if not, display an appropriate message. 5. Clear button The event handler(s) will clear the Amount text box and set the focus back in the Amount text box. Do not clear the labels that display the balances. Do not clear the radio buttons either, since if there was an error the user may still want the same choice. 6. Run through the program a couple of times using and clearing the form. Try all types of entries. See what happens if you enter nonnumeric data, if you don't check an option button, if there are insufficient funds, etc. See if your balances are what you'd expect. Test thoroughly. 7. Follow good naming conventions for object names. Include comments at the top of every method and in the declaration section at the top of the form. 8. Have the form appear in the middle of the screen when the program is run. Arrange the controls on the form in a neat and aesthetically pleasing way. Don't use garish colors. Keep the background neutral.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
csharp using System using SystemIO using SystemWindowsForms public class BankingApplication Form Classlevel variables private decimal checkingBalance ...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