Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions