Answered You can hire a professional tutor to get the answer.

QUESTION

java programmingT1.

   java programmingT1. Write a program that models checkout lines at a supermarket; you have to use one of the data

structures being covered in the lectures and explain why your choice of the data structure is well

justified. Several lines of customers should be displayed. You can add a new customer by pressing a

key. You’ll need to determine how the customer will decide which line to join. The checkers will

take random amounts of time to process each customer (presumably depending on how many

groceries the customer has.) Once checked out, the customer is removed from the line. For

simplicity, you may simulate the passing of time by pressing a key. Perhaps every key-press

indicates the passage of one minute. (Java may have more sophisticated ways to handle time.)

• Submit the source code that you have created to complete the assignment, but not the existing

library code (e.g., library code related to data structures and associated algorithms); specify the

origin of the library code you used (e.g., the textbook website) in the report

The report should also contain the text that explains and discusses your work:

1. It should be easily comprehensible to anyone who has taken a module on Data Structures

and Algorithms.

2. One of the main purposes is to convincingly demonstrate that you understand what you are

presenting.

3. It should be self-contained as much as possible and, thus, should contain the key code

fragments rather than merely referring to the submitted full source code.

4. Discuss any (potential) limitations or weakness of your work and how you would improve

if you have more time. Discussing the weakness would not negatively count towards your

mark. It is a recommended practice

import javax.swing.*;public class Supermarket {private int pArray;private String deptArray;private boolean storeArray;public Supermarket() {int pNum = 3;int sNum = 4;pArray = new...
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question