Please help me to answer the below task!!!!
The algorithm for a buffer of a printing device that will spool data sent to be printed using a queue data structure is described below.
The printer has a buffer size that can hold up to 10 data in one particular time. It will only print when the queue have at least 5 data (and it will print 5 data simultaneously) .
Use the related operations for the queue data structure to develop this program.
Example of outputs that the program must fulfill is as shown below:
Example Output 1:
****Printer Spooling****
1 - send document for printing
2 - printing document
3 - exit
Please choose one :
7
Error : Please choose the correct one
Example Output 2:
****Printer Spooling****
1 - send document for printing
2 - printing document
3 - exit
Please choose one :
1
Enter ID document to printing: 234
Example Output 3:
****Printer Spooling****
1 - send document for printing
2 - printing document
3 - exit
Please choose one :
2
Check programming buffer...
Number in bufer: 1
Error : not enought 5 document
The algorithm for a buffer of a printing device that will spool data sent to be printed using a queue data structure is described below.
The printer has a buffer size that can hold up to 10 data in one particular time. It will only print when the queue have at least 5 data (and it will print 5 data simultaneously) .
Use the related operations for the queue data structure to develop this program.
Example of outputs that the program must fulfill is as shown below:
Example Output 1:
****Printer Spooling****
1 - send document for printing
2 - printing document
3 - exit
Please choose one :
7
Error : Please choose the correct one
Example Output 2:
****Printer Spooling****
1 - send document for printing
2 - printing document
3 - exit
Please choose one :
1
Enter ID document to printing: 234
Example Output 3:
****Printer Spooling****
1 - send document for printing
2 - printing document
3 - exit
Please choose one :
2
Check programming buffer...
Number in bufer: 1
Error : not enought 5 document
Comment