[SOLVED] COSC220-Project 2

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

COSC 220

Project 2 writeup

Testing Plan (all recored in this pdf)

 

The plan is to make sure that I can add remove print and print top for all 4 implementations of stack and all 4 implementations of queue, I shall try to test it all in one go to make sure I do not get segfaults like I did with the last project. I shall post the output in this pdf.

 

Building in linux environment

(warning about header files dosen’t affect running of program

Stack Vector

Add elements

Print and Print top

Remove elements ( and do it until exception handling kicks in

As we can see exceptions were raised and a message similar showed up when trying to print empty stack (same with printing the top)

Exit and tried again with a different implementation

Try it again for stack dynamic array also see input validation in the menu

Removed Element and saw exception handling messages occur

Keep going and do it again with STL list

Added 3 elements to the stack and printed it out

Remove them all and show exception messages happen for deleting and printing

Repeat process with doubly linked list

Add element remove and show error messages

Exit now test process with Queues starting with queue vector

Add some elements and print the queue and the queue front

Remove elements and trigger exception for empty stack and print exception messages

Retry with queue dynamic array

Added some elements and printed them out

Remove elements until nothing is left and exception messages appear

Restart with stl list

Finally test with queue doubly linked list

Add some elements to it

Now remove them all and make sure remove print and print front exceptions work

Exit and don’t repeat

All possible cases tested no errors occurred!

😊

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.