C++ retarded

Hey all,

For you C++ guru's out there, I'm very new to the C++ world and with little help, we have our first project (dont go to UMSL for Comp Sci):

DUE DATE: YESTERDAY, OH GAWD!!

NOTE: This programming exercise is worth 110 points. Programs
received after the due date will be penalized.

INSTRUCTIONS: For this program, you will implement a priority queue.
Your program will prompt the user to enter data values and store
them in the queue. When requested, the data value with the highest
priority will be removed from the queue and displayed. Your
program must test for queue over/under flow, displaying the message
shown below. Any value entered which is > zero will be inserted as data
into the queue. Attempting to insert a 9th item in the queue will cause
the message 'OVERFLOW' to display, and the data item will NOT be
inserted. The prompt will then be displayed. Attempting to remove
from an empty queue will cause the message 'UNDERFLOW' to display,
followed by the prompt. Run the program by executing 'pe2.exe',
located in the usual place.

IMPORTANT: All output will be followed by a single newline.

Size of queue: The queue must hold EIGHT data items, each of type int.

Data Value entered
> 0 data value
= 0 end program
-1 remove and display highest priority element
from queue

Priority levels: int value in range 0 (lowest) to 7 (highest)
inclusive. Data values: any valid C++ int.

NOTE: If several items with the same priority are entered, they will
output in the order entered.

ASSUMPTION: user will enter valid values for data and priority. No
need to validate input.

CAUTION: Output of your program must exactly duplicate
the output shown below, or it will be considered incorrect.

Examples are shown below:

Data: 0
PROGRAM ENDS

Examples are shown below:

Data: 0
PROGRAM ENDS

Data: 22
Pri: 2
Data: 33
Pri: 3
Data: 44
Pri: 4
Data: 77
Pri: 7
Data: 55
Pri: 5
Data: 11
Pri: 1
Data: -1
REMOVED: 77
Data: -1
REMOVED: 55
Data: -1
REMOVED: 44
Data: -1
REMOVED: 33
Data: -1
REMOVED: 22
Data: -1
REMOVED: 11
Data: -1
UNDERFLOW
Data: 0
PROGRAM ENDS

Data: 22
Pri: 2
Data: 33
Pri: 2
Data: 11
Pri: 2
Data: 44
Pri: 2
Data: -1
REMOVED: 22
Data: -1
REMOVED: 33
Data: -1
REMOVED: 11
Data: 15
Pri: 2
Data: -1
REMOVED: 44
Data: -1
REMOVED: 15
Data: -1
UNDERFLOW
Data: 0
PROGRAM ENDS



I'm very lost, and any help would be greatly appreciated. There is little help offered at UMSL, it's kinda sink or float, and I'm drowning...
Waiting until the day after an assignment is due to begin working on it is kind of like sticking in your own feet in pails of concrete and letting it harden before jumping in. No wonder you're drowning!
wow, didn't know this was a philosophy forum, ty
USML Comp Sci? From my searches USML is a good college for a CS degree. I think you need to change majors if you are waiting til the day after it is due and in a course where you don't have a clue what you are doing. That seems like a perfectly simple program to code if you have done the normal introduction and advanced programming courses.
Can you post what you have tried? It will be much easier to help if we have something to work with Also without showing that you have tried it gives the impression that you want someone to do it for. I've never personally written a priority queue, but the assignment looks pretty straight forward. Since the size will be constant you should be able to implement it with an array. I suggest break the problem into parts, first write a queue when that works add priority checks. That's all the help I can really give without any code.
not looking for someone to complete the assignment for me, but at least a PDL for the process someone would take to accomplish the program, for example...

first, i'd build two arrays, a data array and a priority array.. you build arrays by...
Hmmm...

You do know you're asking others to do the difficult and most important part?

If someone was to spell out what to do in that much detail, then they'd have written the program. The rest is just a bit of syntax.
That is why I said what I did. He is waiting to even start it til it is already a day after it was due. Now is asking us to help. Doesn't seem like he is really into the degree. He needs to change degrees or take time off and rethink his career choice as the company will fire him if he pulled the same thing.
Topic archived. No new replies allowed.