Question: This is what inside of simplebank.cpp // BankingApp.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include #include #include

This is what inside of simplebank.cpp
// BankingApp.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include#include #include using namespace std; const double STARTING_BALANCE = 1000.00; const double OVERDRAW_FEE = 25.00; double deposit(double start_balance, double amount) { return start_balance + amount; } double withdrawal(double start_balance, double amount) { if (amount > dep_amt; balance = deposit(balance, dep_amt); if (accept_deposit()) database_write(balance); } void do_withdraw(double& balance) { cout > wd_amt; balance = withdrawal(balance, wd_amt); database_write(balance); dispense_cash(wd_amt); } int main() { double balance = STARTING_BALANCE; int choice; const string menu_string = "Welcome to SimpleBank. (1) Deposit (2) Withdrawal (0) Quit"; do { cout "; cin >> choice; switch (choice) { case 1: do_deposit(balance); break; case 2: do_withdraw(balance); break; case 0: cout As far as I know, I know that database_write might be replaced by the void function database_stub , accept_deposit is replaced by deposit_acceptor_stub , and dispense_cash is replaced by cash_machine_stub.
"Stub" functions are functions that are written before you know how to make them do their actual jobs, so instead they do something simple like return a dummy value or print a message to the screen. Expand on the layered function system of the SimpleBank program shown in Lab 5 by adding the following stub functions: - a void-function "database stub" that prints "*** writing new balance $ \$\#\#\#\#.\#\# to bank database " (replace \#'s with real numbers) after the balance changes (called at the end of do_deposit or do_withdraw) - a "cash machine stub" that prints "*** dispensing $###.## in cash " after a withdrawal that returns a Boolean value -- true signals that cash was successfully dispensed (called at the end of do_withdraw) - a "deposit acceptor stub" that prints "**** opening deposit drawer " after a deposit that returns a Boolean value -- true signals that the deposit was successfully made (called at the end of do_deposit) Submit your improved version of SimpleBank -- now it is SimpleATM -- here. As always, submit a .cpp source code file and screen shots of the working program making both a deposit and a withdrawal. simplebank.cpp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
