亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? simulation.h

?? 上載的是c++源代碼
?? H
字號:

#include <fstream>
#include <string>
#include "queueAsArray.h"

using namespace std;


  //**************** customerType  ****************
class customerType
{
public:
    customerType(int cN = 0, int arrvTime = 0, int wTime = 0, 
                 int tTime = 0);
      //constructor to initialize the data members 
      //according to the parameters
      //If no value is specified in the object declaration, 
      //the default values are assigned.
      //Postcondition: customerNumber = cN;
      //               arrivalTime.clock = arrvTime;
      //               waitingTime.clock = wTime;
      //               transactionTime.clock = tTime
    void setCustomerInfo(int customerN = 0, int inTime = 0, 
                         int wTime = 0, int tTime = 0);
      //Data members are set according to the parameters.
      //Postcondition: customerNumber = customerN;
      //               arrivalTime.clock = arrvTime;
      //               waitingTime.clock = wTime;
      //               transactionTime.clock = tTime
    int getWaitingTime() const;
      //Function to return the waiting time of a customer.
      //Postcondition: The value of waitingTime is returned.
    void setWaitingTime(int time);
      //Function to set the waiting time of a customer.
      //Postcondition: waitingTime = time
    void incrementWaitingTime();
      //Function to increment the waiting time by one time unit.
      //Postcondition: waitingTime++
    int getArrivalTime() const;
      //Function to return the arrival time of a customer.
      //Postcondition: The value of arrivalTime is returned.
    int getTransactionTime() const;
      //Function to return the transaction time of a customer.
      //Postcondition: The value of transactionTime is returned.
    int getCustomerNumber() const;
      //Function to return the customer number.
      //Postcondition: The value of customerNumber is returned.

private:
    int customerNumber;
    int arrivalTime;
    int waitingTime; 
    int transactionTime;
};


	//*************  serverType  ****************
class serverType
{
public:
    serverType();
      //default constructor
      //Sets the values of the data members to their default
      //values.
      //Postcondition: currentCustomer is initialized by its
      //               default constructor; status = "free";
      //               the transaction time is initialized to 0.
    bool isFree() const;
      //Function to determine if the server is free.
      //Postcondition: Returns true if the server is free, 
      //               otherwise returns false.
    void setBusy();
      //Function to set the status of the server to busy.
      //Postcondition: status = "busy"
    void setFree();
      //Function to set the status of the server to "free."
      //Postcondition: status = "free"
    void setTransactionTime(int t);
      //Function to set the transaction time according to the 
      //parameter t.
      //Postcondition: transactionTime = t
    void setTransactionTime();
      //Function to set the transaction time according to 
      //the transaction time of the current customer.
      //Postcondition: 
      //   transactionTime = currentCustomer.transactionTime;
    int getRemainingTransactionTime() const;
      //Function to return the remaining transaction time.
      //Postcindition: The value of the data member 
      //                transactionTime is returned.
    void decreaseTransactionTime();
      //Function to decrease the transactionTime by 1 unit.
      //Postcondition: transactionTime--
    void setCurrentCustomer(customerType cCustomer);
      //Function to set the info of the current customer 
      //according to the parameter cCustomer.
      //Postcondition: currentCustomer = cCustomer
    int getCurrentCustomerNumber() const;
      //Function to return the customer number of the current
      //customer.
      //Postcondition: The value of the data member 
      //               customerNumber of the current customer
      //               is returned.

    int getCurrentCustomerArrivalTime() const;
      //Function to return the arrival time of the current 
      //customer.
      //Postcondition: The value of the data member 
      //               arrivalTime of the current customer
      //               is returned.
    int getCurrentCustomerWaitingTime() const;
      //Function to return the current waiting time of the 
      //current customer.
      //Postcondition: The value of the data member 
      //               transactionTime is returned.
    int getCurrentCustomerTransactionTime() const;
      //Function to return the transaction time of the 
      //current customer. 
      //Postcondition: The value of the data member 
      //               transactionTime of the current customer
      //               is returned.

private:
    customerType currentCustomer;
    string status;
    int transactionTime; 
};


//*************  serverListType  ****************
class serverListType
{
public:
    serverListType(int num = 1);
      //constructor to initialize a list of servers
      //Postcondition: numOfServers = num
      //   A list of servers, specified by num, is created
      //   and each server is initialized to "free".
    ~serverListType();
      //destructor
      //Postcondition: The list of servers is destroyed.
    int getFreeServerID() const;
      //Function to search the list of servers. 
      //Postcondition: If a free server is found, returns 
      //               its ID; otherwise, returns -1.
    int getNumberOfBusyServers() const;
      //Function to return the number of busy servers.
      //Postcondition: The value of busy servers is returned.
    void setServerBusy(int serverID, customerType cCustomer,
                        int tTime);
      //Function to set the server specified by serverID to "busy". 
      //To serve the customer specified by cCustomer, the
      //transaction time is set according to the 
      //parameter tTime.
    void setServerBusy(int serverID, customerType cCustomer);
      //Function to set the server specified by serverID to "busy". 
      //To serve the customer specified by cCustomer, the
      //transaction time is set according to the
      //customer抯 transaction time. 
    void updateServers(ostream& outFile);
      //The transaction time of each busy server is decremented
      //by one unit.
      //Postcondition: If the transaction time of a busy server
      //   is reduced to zero, the server is set to "free". 
      //   Moreover, if the actual parameter corresponding to 
      //   outFile is cout, a message indicating which customer
      //   has been served is printed on the screen, together 
      //   with the customer's departing time. Otherwise, the
      //   output is sent to a file specified by the user.

private:
    int numOfServers;
    serverType *servers;
};


//**************** waitQueue  *************

class waitingCustomerQueueType: public queueType<customerType>
{
public:
    waitingCustomerQueueType(int size = 100);
      //The queue is initialized according to the
      //parameter size.
      //The value of size is passed to the constructor
      //of queueType.
    void updateWaitingQueue();
      //Function to increment the waiting time of each 
      //customer in the queue by one time unit.
};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲欧洲一区高清在线观看| 亚洲午夜激情av| 亚洲精品国产无天堂网2021| 日本 国产 欧美色综合| 91色.com| 欧美国产一区视频在线观看| 老司机精品视频一区二区三区| 色综合天天综合网国产成人综合天 | 成人精品一区二区三区四区 | 国产**成人网毛片九色 | 欧美影视一区在线| 久久久精品国产免大香伊| 亚洲成人综合网站| 91色视频在线| 国产精品国产三级国产a| 国产一区久久久| 日韩欧美国产综合在线一区二区三区| 亚洲免费电影在线| 99re在线精品| 1024成人网色www| 成人午夜激情在线| 久久一夜天堂av一区二区三区| 婷婷成人激情在线网| 在线免费一区三区| 一区二区三区日韩在线观看| eeuss影院一区二区三区| 日本一区二区三区免费乱视频| 美国精品在线观看| 精品三级在线看| 国产一区在线看| 久久久www免费人成精品| 国产伦精品一区二区三区免费迷| 日韩午夜电影av| 麻豆精品国产传媒mv男同| 欧美一区二区三区日韩视频| 视频一区二区三区入口| 91精品国产乱码| 久久国产精品色| 2020日本不卡一区二区视频| 国产精品99久久久久久宅男| 欧美—级在线免费片| 不卡一二三区首页| 中文字幕一区在线| 在线观看精品一区| 三级在线观看一区二区 | 国产精品久久久久久亚洲伦| 成人白浆超碰人人人人| 一区二区三区中文字幕| 欧美精品一卡二卡| 韩国女主播成人在线观看| 国产午夜精品理论片a级大结局| 国产成a人亚洲精品| 亚洲丝袜另类动漫二区| 欧美日韩国产高清一区二区三区| 视频一区二区国产| 国产日韩三级在线| 91网站在线播放| 首页国产欧美久久| 日本一区二区在线不卡| 欧美三级中文字幕在线观看| 久久se精品一区精品二区| 中文字幕不卡三区| 欧美日韩亚州综合| 国产一区激情在线| 一区二区三区在线免费播放| 日韩免费观看高清完整版在线观看| 成人午夜视频网站| 亚洲第一久久影院| 国产欧美一区二区精品婷婷| 欧美性高清videossexo| 国产毛片一区二区| 亚洲大片一区二区三区| 中日韩免费视频中文字幕| 欧美色中文字幕| 国产成人精品在线看| 亚洲mv在线观看| 国产精品拍天天在线| 666欧美在线视频| 色综合天天综合色综合av | 久久久www成人免费毛片麻豆| 色综合久久久久综合体| 国产一区二区视频在线| 亚洲成人动漫av| 国产精品天干天干在线综合| 日韩欧美二区三区| 欧美日韩久久久久久| 成人少妇影院yyyy| 久久精品噜噜噜成人88aⅴ| 亚洲精品v日韩精品| 国产人妖乱国产精品人妖| 欧美精三区欧美精三区| 色狠狠综合天天综合综合| 成人一区二区在线观看| 国产精品综合一区二区三区| 日韩av一级电影| 天天综合色天天综合色h| 一区二区三区在线不卡| 亚洲色图另类专区| 亚洲国产高清aⅴ视频| 亚洲精品一区二区在线观看| 欧美男人的天堂一二区| 欧美性生活影院| 色拍拍在线精品视频8848| aaa欧美日韩| 国产成人自拍网| 国产精品亚洲成人| 韩日欧美一区二区三区| 老司机精品视频线观看86| 午夜精品免费在线观看| 一区二区三区四区高清精品免费观看| 国产精品三级久久久久三级| 亚洲国产精品99久久久久久久久| 久久综合色婷婷| 久久亚洲精品小早川怜子| 日韩欧美国产不卡| 精品国产乱码久久久久久久久| 欧美一区二区日韩| 欧美电视剧免费观看| 精品粉嫩超白一线天av| 精品国产3级a| 中日韩av电影| 亚洲欧洲成人自拍| 亚洲欧美日韩久久精品| 亚洲乱码日产精品bd| 亚洲乱码中文字幕综合| 亚洲一区在线观看视频| 日韩高清不卡一区| 久久97超碰国产精品超碰| 九色综合狠狠综合久久| 国产一区二区三区四区五区入口 | 国产精品1区2区| 国产v日产∨综合v精品视频| 成人av资源在线| 欧亚一区二区三区| 91麻豆精品国产自产在线 | 国产精品综合视频| 97国产一区二区| 欧美日韩性生活| 久久久综合精品| 综合网在线视频| 亚洲高清久久久| 精品一区二区国语对白| 盗摄精品av一区二区三区| 色噜噜偷拍精品综合在线| 在线不卡的av| 久久久国产精品不卡| 一级女性全黄久久生活片免费| 奇米777欧美一区二区| 成人h动漫精品一区二| 欧美日韩在线播放三区四区| 日韩一级完整毛片| 国产精品久久一卡二卡| 肉色丝袜一区二区| 国产成人免费视频一区| 欧美性猛片xxxx免费看久爱| 久久日一线二线三线suv| 亚洲日本一区二区| 蜜桃视频在线观看一区| 97精品久久久久中文字幕 | 在线播放国产精品二区一二区四区| 日韩欧美高清一区| 亚洲欧美精品午睡沙发| 久久69国产一区二区蜜臀| 色999日韩国产欧美一区二区| 精品国产免费一区二区三区香蕉| 亚洲欧美综合网| 黄色成人免费在线| 欧洲精品一区二区| 国产精品网站导航| 九九视频精品免费| 欧洲av一区二区嗯嗯嗯啊| 久久精子c满五个校花| 三级精品在线观看| 91成人在线精品| 国产精品久久福利| 狠狠久久亚洲欧美| 91精品国产色综合久久ai换脸| 中文字幕一区二区不卡| 国产综合色精品一区二区三区| 在线电影院国产精品| 一区二区三区**美女毛片| 粉嫩蜜臀av国产精品网站| 欧美电影免费观看高清完整版在 | 国产清纯白嫩初高生在线观看91| 午夜精品影院在线观看| 91成人看片片| 亚洲欧美日韩国产成人精品影院 | 国产成人小视频| 精品国产区一区| 麻豆91在线观看| 欧美成人激情免费网| 天堂av在线一区| 538在线一区二区精品国产| 亚洲在线成人精品| 91黄色激情网站| 亚洲国产欧美在线| 欧美日韩美女一区二区| 亚洲成人三级小说| 欧美精品久久久久久久久老牛影院| 一区二区国产盗摄色噜噜|