Question
BY using Visual Studio 2017 C# the Goles: ? Practice creating loops ? Practice using conditional logic Create a Console Application and name it YourLastName_PA4.
BY using Visual Studio 2017 C# the Goles: ? Practice creating loops ? Practice using conditional logic Create a Console Application and name it YourLastName_PA4. You will create an banking application that allows the user to deposit and withdraw money into an account. Details:? Your project should do the following: 1.) Create a variable to hold the users account balance, and initialize the balance to $1000.00. All of the users interactions will alter this value. 2.) Create a menu prompt that provides the user 3 options: Deposit, Withdraw, or Exit. The user should be able to keep interacting with your application until the Exit option is selected. 3.) If the user selects the Deposit option, prompt the user to enter in an amount to deposit, and then add that value to the balance. This prompt should be protected against invalid inputs, and should handle negative input values. After the deposit amount has been added to the balance, display the new balance and prompt for next option. 4.) If the user selects the Withdraw option, prompt the user to enter an amount to withdraw, and subtract this amount from the balance. The prompt should be protected against invalid inputs, and should not allow the user to withdraw a negative amount or an amount greater than the current balance. (i.e. if the balance is $100, the user cannot withdraw $101). After the withdraw amount has been subtracted from the balance, display the new balance and prompt for next option. 5.) If the user selects the Exit option, display the final balance and allow the user to press any key to end the application. 6.) If the user selects any invalid option, inform the user the input was invalid and then prompt for next option. Hints/Tips: ? This program contains complex logic, but taken in steps can be simplified. First, create the menu prompt driven loop that takes a user input and reprompts for next user input. This loop should continue until the exit option is selected. Once this loop is complete, start adding the logic to handle the Deposit, Withdraw, and invalid inputs.
Example output Welcome to INFS Bank Please choose an option: (D)eposit (W)ithdraw (E)xit >> S Invalid option. Please try again. Please choose an option: (D)eposit (W)ithdraw (E)xit >> D How much would you like to deposit: 100.00 Your new balance is $1,100.00 Please choose an option: (D)eposit (W)ithdraw (E)xit >> W How much would you like to withdraw: 2000 Not enough funds. Please choose an option: (D)eposit (W)ithdraw (E)xit >> W How much would you like to withdraw: kitten Invalid amount. Please choose an option: (D)eposit (W)ithdraw (E)xit >> W How much would you like to withdraw: 150 Your new balance is $950.00 Please choose an option: (D)eposit (W)ithdraw (E)xit >> E Your final balance is $950.00 Press any key to exit...
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