医务室模拟_vc/类/多线程

上传者: linix999 | 上传时间: 2019-12-21 20:09:07 | 文件大小: 1.57MB | 文件类型: rar
问题描述:假设只有一位医生,在一段时间内随机地来几位病人;假设病人到达的时间间隔为0~14分钟之间的某个随机值,每个病人所需处理时间为1~9分钟之间的某个随机值。试用队列结构进行模拟。 帮朋友写的,用VC++模拟实现,本来想完全用类实现,但要求中要用队列,所以加上了队列结构。使用2个线程模拟医生处理病人事件和病人到达诊所事件。因看了论坛原来的资源需要2分,觉得自己的比那个花的工夫多,而且也更好看点,咱咋也不能比他差吧,另外自己下载资源也老不够分,见谅见谅...贴上数据结构定义部分: class Patient { public: int arrive_time; public: Patient(); virtual ~Patient(); void arrive(int );//添加节点 }; class Doctor { public: int treat_time; int wait_time; public: Doctor(); virtual ~Doctor(); void treat();//产生随机数 void complete();//删除节点 }; struct node { int arrive_time; int wait_time; int treat_time; }; typedef struct t_queue { node data; struct t_queue *link; }queue,*pqueue;

文件下载

资源详情

[{"title":"( 31 个子文件 1.57MB ) 医务室模拟_vc/类/多线程","children":[{"title":"ClinicEmulate","children":[{"title":"ReadMe.txt <span style='color:#111;'> 3.62KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.plg <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"Person.cpp <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"ClinicEmulate.rc2 <span style='color:#111;'> 405B </span>","children":null,"spread":false},{"title":"ClinicEmulate.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"ClinicEmulate.dsp <span style='color:#111;'> 4.23KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.aps <span style='color:#111;'> 35.66KB </span>","children":null,"spread":false},{"title":"ClinicEmulateDlg.cpp <span style='color:#111;'> 8.91KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.h <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.clw <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"vc60.pdb <span style='color:#111;'> 76.00KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.pch <span style='color:#111;'> 4.99MB </span>","children":null,"spread":false},{"title":"vc60.idb <span style='color:#111;'> 201.00KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.pdb <span style='color:#111;'> 265.00KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.res <span style='color:#111;'> 2.80KB </span>","children":null,"spread":false},{"title":"Person.obj <span style='color:#111;'> 17.82KB </span>","children":null,"spread":false},{"title":"ClinicEmulateDlg.obj <span style='color:#111;'> 48.03KB </span>","children":null,"spread":false},{"title":"StdAfx.obj <span style='color:#111;'> 11.36KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.ilk <span style='color:#111;'> 214.25KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.obj <span style='color:#111;'> 23.40KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.exe <span style='color:#111;'> 112.07KB </span>","children":null,"spread":false}],"spread":false},{"title":"ClinicEmulateDlg.h <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.ncb <span style='color:#111;'> 89.00KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.cpp <span style='color:#111;'> 2.11KB </span>","children":null,"spread":false},{"title":"ClinicEmulate.opt <span style='color:#111;'> 91.00KB </span>","children":null,"spread":false},{"title":"Person.h <span style='color:#111;'> 884B </span>","children":null,"spread":false},{"title":"ClinicEmulate.dsw <span style='color:#111;'> 549B </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 215B </span>","children":null,"spread":false},{"title":"ClinicEmulate.rc <span style='color:#111;'> 5.76KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明