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
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