So, I'll start by posting the assignment details, say what I think it is, and then you guys can flame me so I know what to do.
Goal : Implement a priority queue in which you may update the priority of an object in the
queue.
Description : You are to implement a min-priority queue using an array based heap. Them elements of the queue are objects (or structures) having an id which is a string and a value
which is the priority of the object. An input command text le is used to specify the operations on the heap. An output text le is used to store any output results. You will need to create your own heap implementation. The elements of the heap array should be
indirect references to the objects and not actual copies of the objects (this depends on the programming language | C++ should use smart pointers, in Java and Python most objects are all ready indirect references). The priority of an element all ready in the heap may
change, so the program will need to be able to find an object based on its id. You may use your programming language's standard libraries to provide an efficient association between
an id and the object (i.e., associative array, set, unordered set, dict, map, hash-map, etc.).The program must to do something better than a linear search when search for an element in the heap.
Details:
The program should be named pa1 and take one command line parameter:
pa1 input-filename
where input-lename is the name of the text le containing the commands for the heap operations. The le format is defined later in the assignment.
The output of the program should be stored in a le called pa1out.txt. Only store the output specified by the command le.
Use good programming style. Your priority queue code should be separated from the driver program pa1 which is used to test the code and from the class of the object that it is storing.
Input File Format : the input file will be a line based command file. The first letter of each line specifies a command. The commands will be separated from the rest of the line by a whitespace. The rest of the line holds additional information that the command needs. Ignore blank lines.
Then it proceeds to define the commands, like B: build a heap, the rest of the line is id value pairs, A: add news objects to the queue.
Alright, so let me give this a whack. I am going to save the .txt files with the commands from the subversion location. Read them into my program. Use functions to completed tasks into an array of pointers, and then send the array's contents to an output file?