[Solved] Comp 182 Project 2

$25

File Name: Comp_182_Project_2.zip
File Size: 169.56 KB

SKU: [Solved] Comp 182 Project 2 Category: Tag:
5/5 - (1 vote)

Problem: Determine the amount of customer delay when there are n check-out lines.Requirements: You must submit the following Java classes to Canvas as specified inthis document.public class Person{//corresponds to a customerint arrivalTime;int departureTime;int processing Time;}public class Event{//corresponds to either an arrival or departureString type; //can be arrival or departureint time;//if arrival, this will be the arrival time of a job; if departure,//this will be the departure time of a jobint param; if arrival, this will be the processing time of a job; if//departure, this will be the checkout line that had a departure event}public class PersonQueue{int totalTime; //the sum of all processing times in this queue//can use any structure//because this is a queue, you will need enqueue(), dequeue(), isEmpty()}public class EventPQueue{//because this is a priority queue, you will need enqueue(), dequeue(), isEmpty()}public class Store{PersonQueue[] mypq;EventPQueue myeq;int numberOfQueues;//optionalint totalDelay;//optional// will probably need an add method that adds a Person to the PersonQueue with the//least number of people//will probably need a remove method that removes a person from a PersonQueue who//has finished the checkout process}public class Driver{//contains the main method//allows the user to provide the following parameters (a)number of check out//lines, (b) number of persons/customers, (c) min and max time between person//arrivals, (d) min and //max processing time for a person//during run time, the time between arrivals and processing times will be randomly//selected within the user defined ranges}You may add methods and additional fields as you see fit.Sample Output:Welcome to Job SimulatorHow many queues do you want to simulate?> 2How many customers do you want to simulate?> 5What is the minimum time between job arrivals?> 2What is the maximum time between job arrivals?> 5What is the minimum processing time for a job?> 6What is the maximum processing time for a job?> 8Time Activity0 Customer Arrives (processing time 7) Customer Joins Queue 12 Customer Arrives (processing time 8) Customer Joins Queue 25 Customer Arrives (processing time 8) Customer Joins Queue 17 Customer Departs Queue 19 Customer Arrives (processing time 8) Customer Joins Queue 110 Customer Departs Queue 212 Customer Arrives (processing time 6) Customer Joins Queue 215 Customer Departs Queue 118 Customer Departs Queue 223 Customer Departs Queue 1Total Delay: 8

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Comp 182 Project 2
$25