Question: in c++ for beginners libraries please #include #include Problem Statement: Based on the queue Type class we develop in chapter 8, you are asked to

in c++ for beginners libraries please #include
Problem Statement: Based on the queue Type class we develop in chapter 8, you are asked to add the following operations: 1. Modify the addQueue operation to be addOrder, so that the items will be inserted into the queue in ascending order. 2. Add moveNthFront function as a none-member function to move the nth element of the queue to the front. 3. Add mirror Queue function as a none-member function to duplicate the items in the queue in reverse order. Programing Specifications: 1. Your are asked to develop a class named queue Type with the following set of member functions: . A class constructor to initialize the data members. The removeQueue function to remove an item from the queue. The front function to return the item at the front of the queu. The addOrder function to insert new value into the queue in its position such that all elements in the queue are in ascending order. . . . 2. Your are asked to develop the following none-member functions: The moveNthFront function that takes as a parameter a positive integer, n. The function moves the nth element of the queue to the front. The order of the remaining elements remains unchanged. For example, suppose queue = {5, 11, 34, 67, 43, 55) and n = 3. After a call to the function moveNthFront, queue = {34, 5, 11, 67, 43, 55). The mirrorQueue function that duplicate the content of the queue in reverse order. For example, suppose queue = {10, 20, 30, 40, 50). After a call to the function mirror Queue, queue = {10, 20, 30, 40, 50, 50, 40, 30, 20, 10). . Important Notes: You are asked to implement the mirror Queue / moveNthFront functions using stack and queue objects only, any other structures are not allowed. (Hint: Declare stack and queue structures defined in C++ STL )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
