Question: IN C++ CREATE 2 CLASSES and a BANK QUEUE simulation at each time interval. Output the simulation at each interval. The bank has N tellers
IN C++ CREATE 2 CLASSES and a BANK QUEUE simulation at each time interval. Output the simulation at each interval.
The bank has N tellers servicing the customers. As an example, you may choose N = 4. Each teller has two states, free or busy. The program loops through discrete time steps t = 1, 2, . . . Tstop, where T stop is an input parameter. At each time step, either 0, 1 or 2 persons arrive at the bank, and get added to the back of the queue. This information can be read from an input data file. The customers at front of the queue get assigned a free teller. If there are two free tellers at a given time step, then two customers pop off the queue in that time step. Each customer conducts either 1, 2 or 3 tasks, as specified below: Deposit a check Withdraw some cash Print recent transactions, from a list. A teller takes 1 time step to complete a task. So, if a customer wants to deposit a check, and withdraw some cash, the total service time is 2 time steps. The number of customers in the queue gets updated at each time step. Each arriving customer has an ID, account number, account balance and a list of recent transactions, as its data members.
SUGGESTED CLASSES: Teller class, with ID and status. Customer class with ID, account number, account balance and a list of recent transactions. For customer ID, use C1, C2, C3 . . .. This will make it easier to generate and track test input and output. The list of transactions can be in a map associated to each account. All accounts can have a default balance or as an input param
The example input text file for bank looks like this (without headers):
An example output:

tarrival deposit 100 printrecent True False False True withdraw customer C1 C2 C3 C4 ntransact 2 2 4 50 200 10 2 50 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
