Q. Write a C program that uses queue to simulate customers arriving at a bank. Just before opening, customers arrive prepared to do business at the bank, and they get in line. The tellers come to their station, and begin to service these customers one at a time.
Create a structure that represents a customer and his transaction that has the following properties:
Name, bakingActivities(deposit, withdrawl), accountNumber, and amount.
Provide the following operations:
Enqueue(), which means get into the line.
Dequeue(), which means take the first object from the queue. Prints out customer’s name followed by “served” string when dequeue a customer.
Count(), which will tell how many items are in the queue.
Comments
Leave a comment