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.
Recently Asked Questions
- A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk
- Generates a random password of length 5 or 6. use c program . should only contain uppercase ,lowercase and numbers.. use if statements and array if possible..
- . Generates a random password of length 5. passward should contain only lowercase letters and numbers. use c++ programme. use if statements and array if