$29.99
COSC 2430 lab 4: Priority Queue
1. Introduction
You will create a C++ program that can organize the order of tasks base on their priority.
In a priority queue, a task with high priority is served before a task with low priority. A
task said to have a higher priority if it took less amount of time to complete.
2. Input and Output
a. Input file
- Each line in the input file will contain a string and a number, separated
by a space
- The string is the name of the task that you need to organize
- The number will be the time needed to complete that task
- Input might have empty line (ignore empty line)
b. Output file
- Output the task in order according to their priority
- If two or more tasks have the same priority, organize them base on the
order that they were queued
3. Example Output
input1.txt
Answer Phone 1
Booking Appointment 0.5
Organize Documents 2
Schedule Meeting 0.5
Data Entry 4
output1.txt
Booking Appointment
Schedule Meeting
Answer Phone
Organize Documents
Data Entry
4. Turn in your lab assignment
Lab 4 needs to be turned in to our Linux server, follow the link here
https://rizk.netlify.app/courses/cosc2430/2_resources/
Make sure to create a folder under your root directory, name it lab4 (name need to be
lower case), copy your code and argumentmanager.h to this folder, no testcase or other
files needed.
PS: This document may have typos, if you think something illogical, please email TAs for
confirmation.