Question: IN C++. I NEED HELP WITH STEP #1 AND STEP #2 STEP1: Define a member function withdraw() that withdraws money from the account Ensure the

IN C++. I NEED HELP WITH STEP #1 AND STEP #2

STEP1:

Define a member function withdraw() that withdraws money from the account Ensure the withdrawal amount does not exceed the Accounts balance. If it does, the balance remains unchanged but a message is displayed: Withdrawal amount exceeded account balance

STEP 2:

Create a file utility_functions.cpp Include Account.h Define a template function: template int searchAndDeposit(array & accounts, string name, int amount) It searches name parameter in the accounts array and if it finds it deposits the amount into that persons account and returns 1 Otherwise, it returns -1 STEP 3:

in utility_functions.cpp, Define a template function: template int searchAndWithdraw(array & accounts, string name, int amount) It searches name parameter in the accounts array and if it finds it withdraws amount from that persons account and returns 1 Otherwise, it returns -1

SAMPLE OUTPUT:

Accounts:

Jhon Araf

Balance: $300

Jade Milan

Balance: $0

Joe Kafa

Balance: $100

Depositing $240 into Jade Milan's account.

Withdrawing $150 from Jhon Araf's account.

Accounts:

Jhon Araf

Balance: $150

Jade Milan

Balance: $240

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!