头文件定义Customer类,Queue类
//queue.h -- interface for a queue
#ifndef QUEUE_H_
#define QUEUE_H_
//This queue will contain Customer items
class Customer
{
private:
long arrive; //arrival time for customer ,到达时间
int processtime; //processing time for customer排队时间
public:
Customer() {
arrive = processtime = 0; }
void set(long when);
long when()const {
return arrive; }
int ptime()const {
return processtime; }
};
typedef Customer Item;
class Queue
{
private:
//class scope definitions
//Node is a nested structure definition local to this c
struct Node{
Item item;struct Node* next;};
enum {
<