CS案例Data Structures and Algorithm simplementa disc
当前位置:以往案例 > >CS案例Data Structures and Algorithm simplementa disc
2018-02-06

project2(Due11:59PM,Friday,4rdMay, 2018) (10 marks) Objectives



1. Design and implementa discrete eventsimulation

2. Choose and implement appropriate data structures

3. Adapt standard algorithms to a specific problem

Task

Consider the scenario of a license service center. Suppose two services are provided: applying for a new license (Service 1) and renewing an existing license (Service 2). There are three counters (1–3) for Service 1 and three counters (4–6) for Service 2. The customers are categorized based on the type of service they are asking for and each customer is given a ticket number. Each counter serves the customers asking for that particular service, following the order of their ticket numbers. If at the moment there is no customer for that service, the corresponding counter will help serve the customers asking for the other service. For example, Counters 1–3 serve the available customers asking for Service 1; if there is no customer for Service 1, Counter 1–3 help serve the customers asking for Service 2; and vice versa.

Please write a single program which simulates the queuing and service of the customers in this license service center.

Program

Your program should choosetheproperqueuestrategyandrundiscrete eventsimulation. The simulation should start at time 0 and run until all customers have been served. Your program should be readable and well commented.

DataStructuresandAlgorithms

Part of the purpose of this subject is to gain an in-depth understanding of data structures and algorithms. As such, all programming

在线提交订单