Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

struggling very hard with this assignment! Can someone please help? Intro to Programming in C Large Program 2-Bank simulation Assignment purpose: User defined functions, pointer

image text in transcribed

struggling very hard with this assignment! Can someone please help?

Intro to Programming in C Large Program 2-Bank simulation Assignment purpose: User defined functions, pointer arguments, Menu driven program You will write a program that will simulate the management of money in 3 accounts: checking, savings, and credit General Requirements: A preprocessor directive must be used to define a MAXCREDIT of-4500 . . . DO NOT declare any pointers for this assignment DO NOT use global variables DO NOT use break statements to stop loops . Use function prototypes .Write comments for each function before each prototype and again before each function definition. Be sure to comment your code adequately .Be sure to indent properly. Check the course textbook and lecture code examples to see how it should be done. . Use meaningful variable names. NOTE: To transfer between accounts, you need to make a withdraw followed by a deposit . Your starting bank balances should be as follows: o Checking: 480.45 o Savings: o Credit: 124.62 -2134.78 . You must have at least 6 user defined functions as follows o No modifications may be made to the functions #define-CRT-SECURE-NO-WARNINGS #include stdio.h> #define MAXCREDIT -4500 of options available // Displays the list //pronpts for the user'sselection and sets the value of the selection void RunBankChoices(intchoice) /ereets the user void Greeting); //Takes one double argunent and one character argument //displays the current balance of the account ('C checking, 'S' savings, 'R credit) vaid AccountBalance(double account, char letter) //takes reference to all the bank account money values and the nenu selectian /Makes the decsion of which trnsaction should be done void TransactionDecision(int num, double "cPtr, double SPtr, double rPtr); //takes a reference to the selected account balance //gets the added anount fron the user and adds it to the account void DepositNoney(double accountPtr); //takes a reference to the selected account balance //gets the withdraual anount fron the user //checks to see if there is enough noney available OR enough credit available //subtracts the noney from the account if available void WithdrawMoney (dauble accountPtr, char letter) Sample output: Welcone to the Bank of coOP 2220 It is a pleasure to manage your checking, savings, and credit account:s -You currently have $124.62 in your savings account You currently have $480.45 in your checking account You currently have -2134.7B credit balance (1 to DEPOSIT to CHECKING (21 to NITHDRAN Erom CHECKING (3 to DEPOSIT to SAVINGS 4) to |THORAX from SAVINGS 5) to DEPOSIT to CREDIT (6 to TAKE an ADVANCE from CREDIT (T) for all ACCOUNT BALANCES (-1) QUIT

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

Students also viewed these Databases questions