Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Build on the work you did in labs 6/6a for developing the Queue class (Queue.cpp, Queue.h) and its testing in main.cprp Overload the operator to
Build on the work you did in labs 6/6a for developing the Queue class (Queue.cpp, Queue.h) and its testing in main.cprp Overload the operator to perform the same exact task as the enqueue member function, and then perform the tests developed in lab 6 using the new overloaded operator instead of the enqueue function. Note that operator + should return 0 for no error and-1 in case of an error (such as in the Queue-full condition). Also note that the+is a binary operator, where the first operand is your object, and the second operand is the input character just as in the enqueue member function) HINTS: Test your code before you submit it. Debug your code: If it did not work properly, ask why (from a high level) did it not work? Is it an algorithmic or coding error? Use the debugger to identify the root-cause and fix your code. What to hand in: .Your "cpp" and "h" files (with appropriate comments). Do not attach project or solution files A screen shot of your output window showing the output of your program when the user enters n=5 (n=10 for extra credit part) RULES: DO NOT use the queue in the STL library or any other library, you need to develop the code yourself. Work alone and not with teammates. Do not copy code from a colleague, internet, etc Build on the work you did in labs 6/6a for developing the Queue class (Queue.cpp, Queue.h) and its testing in main.cprp Overload the operator to perform the same exact task as the enqueue member function, and then perform the tests developed in lab 6 using the new overloaded operator instead of the enqueue function. Note that operator + should return 0 for no error and-1 in case of an error (such as in the Queue-full condition). Also note that the+is a binary operator, where the first operand is your object, and the second operand is the input character just as in the enqueue member function) HINTS: Test your code before you submit it. Debug your code: If it did not work properly, ask why (from a high level) did it not work? Is it an algorithmic or coding error? Use the debugger to identify the root-cause and fix your code. What to hand in: .Your "cpp" and "h" files (with appropriate comments). Do not attach project or solution files A screen shot of your output window showing the output of your program when the user enters n=5 (n=10 for extra credit part) RULES: DO NOT use the queue in the STL library or any other library, you need to develop the code yourself. Work alone and not with teammates. Do not copy code from a colleague, internet, etc
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started