Question: Given to you declaration class structure in STACK.h and QUEUE.h below. Write testApplication.cpp to solve question below using combination stack and queue structure. There will

 Given to you declaration class structure in STACK.h and QUEUE.h below.

Given to you declaration class structure in STACK.h and QUEUE.h below. Write testApplication.cpp to solve question below using combination stack and queue structure. There will one queue object and two stack object.

Read a sentence, enqueue each of the character into a queue. Each time reading the character check it whether it is consonant or vowel. Push consonant character into stack consonant and push vowel character into vowel stack. Inside Queue there were only consonant character leave inside. Example of the output shown as below.

#data structure ..in need please!!!

STACK.h QUEUE.h class STACK class QUEUE { private: NODE *top; int count; private: NODE *front; NODE *rear; int count; public: STACK(); bool stackEmpty(); bool push (DATA dataIn); bool pop (DATA &dataOut); bool stackTop (DATA &dataOut); public: QUEUE (); bool stackEmpty(); bool enqueue (DATA dataIn); bool dequeue (DATA &dataOut); bool queue Front (DATA &dataOut); bool queueRear (DATA &dataOut); }; Insert a sentence: Congratulation You Win a Display Queue: CngrtitnYWn Display Vowel Stack: iuooiauao Display Consonant Stack: nWYntltronc

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!