Question: Objective: Use fundamental data structures such as stacks, queues, linked - lists, and trees to represent data and meet application requirements. Demonstrate knowledge of recursion

Objective:
Use fundamental data structures such as stacks, queues, linked-lists, and trees to represent
data and meet application requirements.
Demonstrate knowledge of recursion by describing common applications and by effectively
using it to solve problems.
Use of appropriate algorithms to solve common computing problems.
Problem:
Write a simulation program of cashier lines at a grocery store. Assume that this store has five
cashier lines. Customers enter randomly to check out, and then enter the shortest line. If the lines
are equal, then the first available line is chosen. Each transaction takes a random amount of time to
complete. The customer can:
avoid a line if all lines are a certain length
leave a line if they have waited beyond a certain time
check if another line is shorter at specified time intervals
switch lines if another line is shorter
Note:
1. Use an ArrayBag to implement the queue
2. Do NOT use any Java-built in data structures (e.g. ArrayList, List, Queue, etc).
3. Submit your program as a complete, stand-alone, runnable program.

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 Programming Questions!