Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Computer Science II Queue Simulation Lab Introduction This lab will be an experimental one, where you use the software to determine numbers of queues and resulting wait times for the simulation of queues and service times. Objectives Understand a basic queuing model Understand the basic ideas of modeling through simulation software. Understand how simulation can be used to determine reasonable numbers of queues based on simple characteristics of arrival and service times. More experience reading OO Java code Tasks This is based on the book, Chapter 4, exercises #39 and #40: Assume the units of time are minutes. Fill in the table if there was one queue. The next customer can't start until the previous customer is finished. Customer Arrival Time Service Time Finish Time Wait Time 1 0 10     2 8 3     3 8 10     4 9 40     5 20 15     6 32 18     What is the average wait time? _______ Fill in the table as if there were two queues. Customer Arrival Time Service Time Finish Time Wait Time 1 0 10     2 8 3     3 8 10     4 9 40     5 20 15     6 32 18     What is the average wait time? _______ Fill in the table as if there were three queues. Customer Arrival Time Service Time Finish Time Wait Time 1 0 10     2 8 3     3 8 10     4 9 40     5 20 15     6 32 18     What is the average wait time? _______ Experiment with the simulation from the book Download the following Java files into the same folder. Customer.java CustomerGenerator.java Simulation.java SimulationCLI.java QueueInterface.java GlassQueueInterface.java LinkedGlassQueue.java LinkedQueue.java LLNode.java QueueUnderflowException.java QueueOverflowException.java Compiling will result in one warning, which in this case can be ignored (it's even footnoted in the book). Run the simulation with several inputs. Here is a sample run: Enter the minimum interarrival time: 0 Enter the maximum interarrival time: 10 Enter the minimum service time: 5 Enter the maximum service time: 20 Enter the number of queues: 2 Enter the number of customers: 2000 Average waiting time is XXXX In the Average Waiting Time program, which class is responsible for: Providing the size of the queue? Calculating the finish time of a customer? Deciding which queue a customer enters? Calculating the waiting time for a customer? Obtaining the number of queues from the user? Calculating the average waiting time? Calculating the arrival time of a customer?