文件名称:printer
介绍说明--下载内容均来自于网络,请自行研究使用
测试你对这项任务队列和你有能力使用STL队列适配器的理解。您被要求完成的实施方案模拟一个共享打印机。这种打印机使用先入先出队列。
仿真工程通过阅读和处理从数据文件中的事件列表。每一个有效的数据文件中的行包含有关打印作业和作业提交时,这个时间信息。具体来说,在每一行中包含的信息是时间(以秒为单位)提交作业,在作业的页面长度,以及从中作业提交计算机的名称。在仿真开始时,这些事件都应该是阅读的计划,并在继承的工作量队列中。
该方案应通过增加内部模拟一个循环或while循环计数器时间的推移。该方案应初始化这个计数器为零,并增加一秒钟。打印作业“降临”时,模拟当前时间等于在工作量的队列前面的打印作业提交的时间。当这种情况发生,流行的工作量队列这一事件并将其放置在另一个队列<event>对象。这其他队列<event>对象存储的“到达”的打印作业。这些工作,而在此队列中等待的程序模拟印刷的其他工作。因此,你可能要等待此对象的名称或类似的东西。 -This assignment tests your understanding of queues and your ability to use the STL queue adapter. The program you are asked to finish the implementation of simulates a shared printer. This printer uses a first-in-first-out queue.
The simulation works by reading and processing a list of events from a data file. Each line in a valid data file contains information about a print job and a time when this job was submitted. Specifically, the information contained in each line is the time (in seconds) the job was submitted, the length in pages of the job, and the name of the computer from which the job was submitted. At the beginning of the simulation, each of these events should be read in by the program and stored in the inherited workload queue.
The program should simulate the passage of time by incrementing a counter inside a for-loop or while-loop. The program should initialize this counter to zero and increment it by one second. A print job "arrives" when the current time of the simu
仿真工程通过阅读和处理从数据文件中的事件列表。每一个有效的数据文件中的行包含有关打印作业和作业提交时,这个时间信息。具体来说,在每一行中包含的信息是时间(以秒为单位)提交作业,在作业的页面长度,以及从中作业提交计算机的名称。在仿真开始时,这些事件都应该是阅读的计划,并在继承的工作量队列中。
该方案应通过增加内部模拟一个循环或while循环计数器时间的推移。该方案应初始化这个计数器为零,并增加一秒钟。打印作业“降临”时,模拟当前时间等于在工作量的队列前面的打印作业提交的时间。当这种情况发生,流行的工作量队列这一事件并将其放置在另一个队列<event>对象。这其他队列<event>对象存储的“到达”的打印作业。这些工作,而在此队列中等待的程序模拟印刷的其他工作。因此,你可能要等待此对象的名称或类似的东西。 -This assignment tests your understanding of queues and your ability to use the STL queue adapter. The program you are asked to finish the implementation of simulates a shared printer. This printer uses a first-in-first-out queue.
The simulation works by reading and processing a list of events from a data file. Each line in a valid data file contains information about a print job and a time when this job was submitted. Specifically, the information contained in each line is the time (in seconds) the job was submitted, the length in pages of the job, and the name of the computer from which the job was submitted. At the beginning of the simulation, each of these events should be read in by the program and stored in the inherited workload queue.
The program should simulate the passage of time by incrementing a counter inside a for-loop or while-loop. The program should initialize this counter to zero and increment it by one second. A print job "arrives" when the current time of the simu
(系统自动生成,下载前可以参看下载内容)
下载文件列表
printer\arbitrary.out
.......\arbitrary.run
.......\bigfirst.out
.......\bigfirst.run
.......\event.cpp
.......\event.h
.......\fifo.cpp
.......\fifo.h
.......\job.cpp
.......\job.h
.......\main.cpp
.......\simulator.cpp
.......\simulator.h
.......\simulator.rar
printer
.......\arbitrary.run
.......\bigfirst.out
.......\bigfirst.run
.......\event.cpp
.......\event.h
.......\fifo.cpp
.......\fifo.h
.......\job.cpp
.......\job.h
.......\main.cpp
.......\simulator.cpp
.......\simulator.h
.......\simulator.rar
printer