our task for this assignment is to develop a print scheduling application. The application will use an array-based heap to implement a priority queue data structure in C++. This will be accomplished utilizing a user-defined Heap class. 1. Implement a transaction-based priority queue data structure using C++. The program will be interactive. A prompt will be displayed requesting an input transaction. Each input transaction will be entered at the command line and results will be displayed on the console. 2. Each input transaction will represent either (1) a new print request transaction or (2) a “service” transaction. A new print request transaction will be represented in two parts separated by a hyphen: customer name (variable length) and print file size in pages (positive integer). Each new print request is issued a sequential 2-digit ticket number (00 through 99). Each print request is scheduled based on priority and ticket. A small size request (i.e., less than 4 pages) is assigned priority 1 (highest). A medium size request (4 to 10 pages) is assigned priority 2. A large size request (more than 10 pages) is assigned a priority 3 (lowest). Each print request is placed in a priority queue and will be serviced by the next available printer. A “service” transaction results in a print request being removed from the priority queue and the customer name being displayed on the console. A transaction containing the string “end-of-file” will signal the end of the input. Your program will display the number of print requests remaining in the queue when the “end-of-file” transaction is processed. Sample input transactions and output expected using a priority queue: guo-4 hannie-1 ian-20 service (output: hannie) service (output: guo) danny-2 eli-17 fan-3 service (output: danny) service (output: fan) end-of-file (output: There are 2 remaining print requests in the queue.) 3. The program will be run at the command prompt by navigating to the directory containing the executable version of the program after the program is compiled. Assume that each transaction is prepared properly. Use an array with a capacity for 10 print requests. Display “Error: queue is empty” and “Error: queue is full” messages as needed.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PLEASE MAKE SURE ITS UNIQUE

Your task for this assignment is to develop a print scheduling application. The application will use an array-based heap to implement a priority queue data structure in C++. This will be accomplished utilizing a user-defined Heap class.

1. Implement a transaction-based priority queue data structure using C++. The program will be interactive. A prompt will be displayed requesting an input transaction. Each input transaction will be entered at the command line and results will be displayed on the console.

2. Each input transaction will represent either (1) a new print request transaction or (2) a “service” transaction. A new print request transaction will be represented in two parts separated by a hyphen: customer name (variable length) and print file size in pages (positive integer). Each new print request is issued a sequential 2-digit ticket number (00 through 99). Each print request is scheduled based on priority and ticket. A small size request (i.e., less than 4 pages) is assigned priority 1 (highest). A medium size request (4 to 10 pages) is assigned priority 2. A large size request (more than 10 pages) is assigned a priority 3 (lowest). Each print request is placed in a priority queue and will be serviced by the next available printer.

A “service” transaction results in a print request being removed from the priority queue and the customer name being displayed on the console. A transaction containing the string “end-of-file” will signal the end of the input. Your program will display the number of print requests remaining in the queue when the “end-of-file” transaction is processed.

Sample input transactions and output expected using a priority queue:

guo-4

hannie-1

ian-20

service (output: hannie)

service (output: guo)

danny-2

eli-17

fan-3

service (output: danny)

service (output: fan)

end-of-file (output: There are 2 remaining print requests in the queue.)

3. The program will be run at the command prompt by navigating to the directory containing the executable version of the program after the program is compiled. Assume that each transaction is prepared properly. Use an array with a capacity for 10 print requests. Display “Error: queue is empty” and “Error: queue is full” messages as needed.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education