Programming Assignment #2

Grades


Proper Submission

a- Submitted a tar file containing only the following:

- In case of C++: queue.C, queue.h, makefile (Makefile), driver.C + one or more scripts.

- In case of C : queue.c, queue.h, makefile (Makefile), driver.c + one or more scripts.

b- The tar file does not contain any directories.

c- The program should run by typing the following:

make

driver

If you violated one or more of the previous rules, you loose 10 marks for improper submission. For more information, please refer to the grading guidelines of programming assignment #2.


Test Cases

1- Probe & Head: Two cases have been considered:

- Call the function on a non-empty queue (case 1).

- Call the function on an empty queue (case 2).

2- timeout: call to dequeue with timeout = 2 sec three times, on one empty queue, and checking the amount of time elapsed before the function returns.

3- Reading & Writing:

- Case 1

(testing underflow):

inserting 1 item into the queue and calling dequeue twice.

 

(testing overflow) :

creating a queue of 2 items and trying to insert 3 elements.

- Case 2

(insertion & deletion):

create two queues, each with maxItems of 20. Simultaneously enqueue to first queue, dequeue from the first queue and enqueue what was dequeued into the second queue, and dequeue from the second queue. Compare the sum of all the values enqueued and dequeued.

 

(insertion & deletion, larger size):

simultaneously enqueue, dequeue of integers 0 to 9999 on queue with maxItems of 100. Compare the sum of all the values enqueued and dequeued.


Documentation

I looked for the following:

1- Clarity and readability.

2- Well documented code, comments before major sections of the code to describe what they are doing, over-commenting was penalized.

3- Choosing meaningful names for variables.

4- Using #define to identify any constants in your code.

5- Indenting your source code.


 

General Notes

1- Error in the "Total" field means that I have got a compilation error during compiling your code. So please contact me during my office hours to figure out what was the problem.

2- A "-" in all the fields means that either you have not submitted the assignment or you submitted it late.



 

Probe

Head

Reading & Writings

SSN#

proper 10

case 1 5

case 2 5

case 1 5

case 2 5

case 1 10

case 2 10

Timeout 10

doc 40

Total 100

0489

10

5

5

5

5

10

5

0

40

85

0503

0

5

5

5

5

5

0

10

20

55

0590

10

5

5

5

5

10

10

10

40

100

0821

10

5

5

5

5

10

10

10

40

100

0845

-

-

-

-

-

-

-

-

-

-

1024

-

-

-

-

-

-

-

-

-

-

1070

-

-

-

-

-

-

-

-

-

-

1381

10

5

5

5

5

5

0

0

40

75

1752

10

5

5

5

5

0

0

10

40

80

2032

10

5

5

5

5

10

0

0

40

80

2233

10

5

5

5

5

5

10

10

40

95

2808

10

5

5

5

5

5

0

0

40

75

2912

-

-

-

-

-

-

-

-

-

-

3085

10

5

5

5

5

0

5

0

40

75

3093

0

5

5

5

5

10

10

10

40

90

3495

Error

3510

0

5

5

5

5

0

0

0

40

0

3623

10

5

5

5

5

5

5

0

40

80

4293

0

5

5

5

5

10

10

10

30

80

4295

10

5

5

5

5

10

10

0

40

90

4412

10

5

5

5

0

5

0

0

40

70

4432

10

5

5

5

5

10

10

10

40

100

4746

-

-

-

-

-

-

-

-

-

-

4788

10

5

5

5

5

10

10

10

40

100

4806

10

5

5

5

5

10

10

0

40

90

5098

0

5

5

5

5

10

10

10

40

90

5460

-

-

-

-

-

-

-

-

-

-

6044

10

5

5

5

5

5

0

0

40

75

6091

10

5

5

5

5

10

10

0

40

90

6497

10

5

5

5

5

10

10

10

40

100

7531

10

5

5

5

0

5

0

10

40

80

7860

10

5

5

5

5

10

10

0

40

90

8074

10

5

5

5

0

0

0

0

40

65

8298

10

5

5

0

5

5

10

0

40

80

8323

-

-

-

-

-

-

-

-

-

-

8715

10

5

5

0

5

0

0

0

40

65

8720

10

5

5

5

5

10

5

0

40

85

8729

10

5

5

5

5

5

10

0

40

85

8923

Error

9090

10

5

5

5

5

10

10

0

40

90

9361

10

5

5

5

5

10

10

0

40

90

9419

10

5

5

5

5

5

10

0

40

85

9694

0

5

5

5

5

10

10

10

40

90

9780

10

5

5

5

0

5

0

0

40

70

Average

81.5

Max

100

Min

0