C++ Inheritance and Polymorphism
Design a queue class by priviate inherting the unorderedArrayListType class. A queue class is a First-In-First-Out data structure. To understand a queue, think of a checkout line at a grocery store: the person at the front is served first (removed), and people are added to the line from the back end. Overload the output operator << for the queue class so you can easily print out a queue (add function prologue, param-type and pre-/post- comments). You have to overload it due to the private inheritance. Add appropriate code into main to test your queue class (you may delete the existing code in main at this point). Be sure to test each function and print out current content of a queue object.
- You should not directly access the int* list data member of the arrayListType class in your implementation such as use list or list[someIndex] (0 credits if you did). Instead, you should call existing functions provided in the .cpp file.
- You should not modify the given arrayListType / unorderedArrayListType code (0 credits if you did), except for deleting the given main code and breaking the code into header + implementation (see next requirement).
- Organize your program into header files (interface), implementation files, and driver file. Use #include guard with each header file. You should have 3 pairs of (header + implementation) plus one driver file.
Comment your program appropriately. Pay attention to the standard stuff like coding style, indention, heading, and curly braces.
372,107 students got unstuck by Course
Hero in the last week
Our Expert Tutors provide step by step solutions to help you excel in your courses