Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help with c++ programming with all the requirements: - use dynamic queue as the data structure - simulates the whole executions till completion -
need help with c++ programming with all the requirements:
- use dynamic queue as the data structure
- simulates the whole executions till completion
- should prints the time when the print job from each student started and their waiting time.
- it also need to calculate the time needed to complete all printing jobs and the average waiting time.
Consider the following situation in a computer science laboratory. On any average day about 10 students are working in the lab at any given hour. These students uses the shared printer in the lab to print their assignments and reading materials. The time taken for printing tasks varies from one another depending on the pages volumes printed by students. Students can send printing instructions from any terminals attached to same network of the printer. Hence, many students can do so at once. Below is the six printing job (each labelled as Task ID) that await to be printed along with their printing time and arrival time. Note that time unit starts with to. Task ID T1 T2 T3 T4 T5 T6 Table 1 Execution Time 3 unit time 5 unit time 2 unit time 4 unit time 6 unit time 1 unit time Arrival Time to t1 t3 to t10 t14 The timeline of printing job arrival time for Table 1 is illustrated in Figure 1 (up until the last job arrived). t3 t4 t5 to T1 to Arrival Time t6 tz t: T4 t1 T2 t10 111 t12 t13 114 T5 T6 T3 Figure 1 Explain how can the printer handles the many instructions. Show your solution in terms of flowchart and full program. Make sure your program use dynamic queue as the data strcuture and simulates the whole executions till completion. Your program should prints the time when the print job from each student started and their waiting time. It also need to calculate the time needed to complete all printing jobs and the average waiting timeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started