You are to write a program that will try to optimize the time it takes to process customers in check-out lines inside a grocery store. You will use the Queue data structure for this [login to view URL] general idea is to always place customers in the best checkout line possible. This will be based on the total number of customers and the number of items in each cart being processed. The time to serve a single customer is calculated by the following formula:
t = 45 + 5*ni;
where:t, time in seconds that it takes to serve a customer,
ni, the number of items in the customers cart.
A store consists of 1 or more check-out linesdefined by:
n = number of normal check-out lines
f = number of express check-out lines(less than or equal to x items)A store could have up to 4 fast check-out lines.
Customers at the store may have many items in their cart or only a few. Each new customer will be added to the check-out line with the cumulative least amount of time in front of it (the shortest line). Any customer may optionally enter one of f express lines if they have less than or equal x items in the cart. It should be noted that they do not need to enter an express line if another check-out line would result in a shorter service time. Customers with more than x items must enter one of the other n check-out lines in the store. The total number of check-out lines will be equal to n+ f.
Hi..I am proficient in core Java OO programming along with design and implementation of data structures, algorithms and can help you write the grocery check out simulation program for optimal check out time for each customers as per given specs as a console based program.
I'm good at algorithms. I have participated in many computer olympics. Now I have a lot of free time and I wanted to explore this platform a bit.
Relevant Skills and Experience
I use Java, C++, Python, Ruby, Javascript. I have a bit of experience in web and mobile development.