Question: PLEASE COMPLETE USING C++ ONLY THANKS! A withdrawal will be represented by: W$$ where $$ represents in dollars how much to withdraw. A deposit will
PLEASE COMPLETE USING C++ ONLY THANKS!
A withdrawal will be represented by: W$$ where $$ represents in dollars how much to withdraw.
A deposit will be represented by: D$$ where $$ again represents in dollars how much to deposit.
A balance inquiry will be represented by Q
The program will input from a file named transactions.txt a series of events that occur. The first number will be the total number of transactions, each subsequent line will represent a transaction.
For example: INPUT: (transactions.txt)
Founder
10
Q D100 Q D500 W200 D100 D300 W100 Q W50
Acc1
6
Q W100 Q D500 Q W200
Acc2
11
Q Q Q Q Q W90 Q Q Q W200 Q
END
Output:
The account balance is:
Your job is to simulate this system, using mutexes to insure accuracy.
The program name should be atm.cpp.
Efficiency is important and prevention of deadlock is important.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
