在线现看午夜福利片|女人16久久免费视频|鲁丝片一区鲁丝片二区鲁丝|一区二区三区欧美在线

  1. 
    
    <b id="glvx9"></b>
        1. <blockquote id="glvx9"><meter id="glvx9"></meter></blockquote>
            首頁 考試吧論壇 Exam8視線 考試商城 網絡課程 模擬考試 考友錄 實用文檔 求職招聘 論文下載
            2011中考 | 2011高考 | 2012考研 | 考研培訓 | 在職研 | 自學考試 | 成人高考 | 法律碩士 | MBA考試
            MPA考試 | 中科院
            四六級 | 職稱英語 | 商務英語 | 公共英語 | 托福 | 雅思 | 專四專八 | 口譯筆譯 | 博思 | GRE GMAT
            新概念英語 | 成人英語三級 | 申碩英語 | 攻碩英語 | 職稱日語 | 日語學習 | 法語 | 德語 | 韓語
            計算機等級考試 | 軟件水平考試 | 職稱計算機 | 微軟認證 | 思科認證 | Oracle認證 | Linux認證
            華為認證 | Java認證
            公務員 | 報關員 | 銀行從業(yè)資格 | 證券從業(yè)資格 | 期貨從業(yè)資格 | 司法考試 | 法律顧問 | 導游資格
            報檢員 | 教師資格 | 社會工作者 | 外銷員 | 國際商務師 | 跟單員 | 單證員 | 物流師 | 價格鑒證師
            人力資源 | 管理咨詢師考試 | 秘書資格 | 心理咨詢師考試 | 出版專業(yè)資格 | 廣告師職業(yè)水平
            駕駛員 | 網絡編輯
            衛(wèi)生資格 | 執(zhí)業(yè)醫(yī)師 | 執(zhí)業(yè)藥師 | 執(zhí)業(yè)護士
            會計從業(yè)資格考試會計證) | 經濟師 | 會計職稱 | 注冊會計師 | 審計師 | 注冊稅務師
            注冊資產評估師 | 高級會計師 | ACCA | 統(tǒng)計師 | 精算師 | 理財規(guī)劃師 | 國際內審師
            一級建造師 | 二級建造師 | 造價工程師 | 造價員 | 咨詢工程師 | 監(jiān)理工程師 | 安全工程師
            質量工程師 | 物業(yè)管理師 | 招標師 | 結構工程師 | 建筑師 | 房地產估價師 | 土地估價師 | 巖土師
            設備監(jiān)理師 | 房地產經紀人 | 投資項目管理師 | 土地登記代理人 | 環(huán)境影響評價師 | 環(huán)保工程師
            城市規(guī)劃師 | 公路監(jiān)理師 | 公路造價師 | 安全評價師 | 電氣工程師 | 注冊測繪師 | 注冊計量師
            繽紛校園 | 實用文檔 | 英語學習 | 作文大全 | 求職招聘 | 論文下載 | 訪談 | 游戲
            您現在的位置: 考試吧(Exam8.com) > 計算機等級考試 > 計算機二級 > C加加 > 復習資料 > 正文

            計算機二級C++數據結構學習:事件驅動模擬

            來源:考試吧Exam8.com) 2010-8-19 15:27:26 考試吧:中國教育培訓第一門戶 模擬考場
            考試吧提供計算機二級C++復習資料:事件驅動模擬,方便考生備戰(zhàn)計算機等級考試。

              Simulation(inttellerNum,intsimuTime,intarrivalLow,intarrivalHigh,intserviceLow,intserviceHigh)

              :tellerNum(tellerNum),simuTime(simuTime),arrivalLow(arrivalLow),arrivalHigh(arrivalHigh),

              serviceLow(serviceLow),serviceHigh(serviceHigh),

              arrivalRange(arrivalHigh-arrivalLow+1),serviceRange(serviceHigh-serviceLow+1)

              {srand((unsigned)time(NULL));}

              voidInitialize()

              {

              curTime=nextTime=0;

              customerNum=customerTime=0;

              for(inti=1;i<=tellerNum;i++)

              {

              tellers[i].totalCustomerCount=0;

              tellers[i].totalServiceTime=0;

              tellers[i].finishServiceTime=0;

              }

              customer.MakeEmp ty();

              }

              voidRun()

              {

              Initialize();

              NextArrived();

              #ifdefPRINTPROCESS

              cout<

              cout<<"tellerID";

              for(intk=1;k<=tellerNum;k++)cout<<"\tTELLER"<

              cout<

              #endif

              for(curTime=0;curTime<=simuTime;curTime++)

              {

              if(curTime>=nextTime)

              {

              CustomerArrived();

              NextArrived();

              }

              #ifdefPRINTPROCESS

              cout<<"Time:"<

              #endif

              for(inti=1;i<=tellerNum;i++)

              {

              if(tellers[i].finishServiceTime

              if(tellers[i].finishServiceTime==curTime&&!customer.IsEmpty())

              {

              intt=NextService();

              #ifdefPRINTPROCESS

              cout<<'\t'<

              #endif

              CustomerDeparture();

              tellers[i].totalCustomerCount++;

              tellers[i].totalServiceTime+=t;

              tellers[i].finishServiceTime+=t;

              }

              #ifdefPRINTPROCESS

              elsecout<<"\t";

              #endif

              }

              #ifdefPRINTPROCESS

              cout<

              #endif

              }

              PrintResult();

              }

              voidPtintSimuPara()

              {

              cout<

              cout<<"柜臺數量:"<

              cout<<"兩個顧客來到的最小間隔時間:"<

              cout<<"兩個顧客來到的最大間隔時間:"<

              cout<<"柜臺服務最短時間:"<

              cout<<"柜臺服務最長時間:"<

              }

              voidPrintResult()

              {

              inttSN=0;

              longtST=0;

              cout<

              cout<<"----模擬結果------";

              cout<

              for(inti=1;i<=tellerNum;i++)

              {

              cout<<"TELLER"<

              cout<<'\t'<

              cout<<'\t'<

              cout<<'\t';

              if(tellers[i].totalCustomerCount)

              cout<<(flo at)tellers[i].totalServiceTime/(float)tellers[i].totalCustomerCount;

              elsecout<<0;

              cout<<""<

              }

              cout<<"TOTAL\t"<

              if(tSN)cout<<(float)tST/(float)tSN;elsecout<<0;

              cout<<""<

              cout<<"CustomerNumber:\t"<

              cout<<"CustomerWaitTime:\t"<

              if(tSN)cout<<(float)customerTime/(float)tSN;elsecout<<0;

              cout<

              }

              private:

              inttellerNum;

              intsimuTime;

              intcurTime,nextTime;

              intcustomerNum;

              longcustomerTime;

              intarrivalLow,arrivalHigh,arrivalRange;

              intserviceLow,serviceHigh,serviceRange;

              Tellertellers[21];

              Queuecustomer;

              相關推薦:2010年9月計算機等級考試精華備考資料匯總
                   2010年全國計算機等考二級C++模擬試題匯總(8.18)
                   2010年全國計算機等級考試全攻略(一至四級)
            文章搜索
            版權聲明:如果計算機等級考試網所轉載內容不慎侵犯了您的權益,請與我們聯系800@exam8.com,我們將會及時處理。如轉載本計算機等級考試網內容,請注明出處。