C++ Inheritance and Polymorphism Design a queue class by priviate inherting the unorderedArrayListType class. A queue class is a First-In-First-Out...
View the step-by-step solution to:

Question

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

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes