Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Intro to Programming in C program 4 (larger program) Assignment purpose: To compile, build, and execute an interactive program using functions from stdio.h (printf and

Intro to Programming in C program 4 (larger program) Assignment purpose: To compile, build, and execute an interactive program using functions from stdio.h (printf and scanf), math in C, conditions, a while loop, and programmer defined functions. #define _CRT_SECURE_NO_WARNINGS //for Visual studio compiler #include //for printf and scanf Instructions: For this assignment you will be implementing a program that simulates a banking application with 2 accounts: checking and savings Please use an app with 7 MENU OPTIONS 1. Initialize the balance in the checking account to $276.20 2. Initialize the balance in the savings account to $124.61 3. The program will welcome the user with a friendly message and instructions. 4. Display the balance in both accounts at the start of execution 5. Display the item options: (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT 6. The user will make the selection based on the item number 7. The user may continue to use the bank app until entering (-1) to QUIT Use the following programmer defined functions. DO NOT modify the Functions: //greets the user void Greeting(); // Displays the list of options available //prompts for the users selection and returns that value int RunBankChoices(); //Input: one double and one character //displays the balance of the account ('C', checking or 'S', savings) void DisplayBalance(double accountBalance, char account); //Input: one double and one character //declare, ask, and get the amount from the user and add it to the account //return the updated balance ('C', checking or 'S', savings) double DepositMoney(double accountBalance, char account); //Input: one double and one character //declare, ask, and get the amount from the user //subtract the money from the account if available //return the updated balance ('C', checking or 'S', savings) double WithdrawMoney(double accountBalance, char account);

Additional information: You can assume the user will enter an integer for the number selection One algorithm will be submitted (lastname_proram4alg.pdf) One source code file (unformatted text) will be submitted The file name must match the assignment (lastname_program4.c) The code should be tested and run on an IDE before it is uploaded onto Canvas The code must be submitted on time in order to receive credit, do not wait until the last minute Late submissions, or email submissions will not be accepted for grading All programming assignments are individual work, sharing code is considered cheating Here are some tips and tricks that will help you with this assignment and make the experience more enjoyable. Do not try to write out all the code at once. For each new line of code written (2-3 lines), build it to see if it compiles successfully. After any successful build, run the executable to see what happens so you know what to do next! o If the program performs as expected, you can then move onto the next step o If you try to write everything at once and build it successfully to find out it does not work properly, you will get frustrated trying to find out the logical error in your code! Logical errors are the hardest to fix and identify in a program! Start the assignment early! Do not wait last minute (the day of) to begin the assignment. Sample Output: Welcome to the Bank of COP 2220 It is a pleasure to manage your checking and savings accounts The balance in your checking account is $276.20 The balance in your savings account is $124.61 ************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :1 You selected 1 The balance in your checking account is $276.20 enter the amount to add to your checking account:20.00 The balance in your checking account is $296.20

************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :2 You selected 2 The balance in your checking account is $276.20 enter the amount to subtract from your checking account:300.00 You do not have enough money in your checking account to cover your request! The balance in your checking account is $276.20 ************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :3 You selected 3 The balance in your savings account is $124.61 enter the amount to add to your checking account:10.00 The balance in your savings account is $134.61 ************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :4 You selected 4 The balance in your checking account is $124.61 enter the amount to subtract from your savings account:60.00 The balance in your checking account is $64.61

************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :5 You selected 5 The balance in your checking account is $276.20 ************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :6 You selected 6 The balance in your savings account is $124.61 ************************************** (1) to DEPOSIT to CHECKING ACCOUNT (2) to WITHDRAW from CHECKING ACCOUNT (3) to DEPOSIT to SAVINGS ACCOUNT (4) to WITHDRAW from SAVINGS ACCOUNT (5) to display CHECKING ACCOUNT BALANCE (6) to display SAVINGS ACCOUNT BALANCE (-1) to QUIT Select an option :-1 You selected -1 Thank you and have a great day!

Code in C as it says above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

1. What are the peculiarities of viruses ?

Answered: 1 week ago

Question

Describe the menstrual cycle in a woman.

Answered: 1 week ago

Question

1. Identify the sources for this conflict.

Answered: 1 week ago