0

Please could you show me how to use stakcs and queue to create a program that divided letters (a,b,c,d,e...x,y,z) by vowel and consonant letters.We have two stacks:in first should be vowel letters and in second consonant letters.

Thanks in advance!

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by geethasree
0

hmm, that seems to be a broad prespective of information you are asking.

How far are you familiar with any programming language (C / C++ / JAVA)?

if you are not familiar then you should take a tutorial and get familiar with it first.

if you are then here is the skeleton, you can work out the operations by your self

#include<iostream.h>


class stackSkeleton
{
      private:
              int top, stack[20];
      public:
             stackSkeleton();
             void push(<any parameters you want>);
             void pop(<any parameters you want>);
             int current ()
                 {
                 return top;
                 }
};

stackSkeleton::stackSkeleton()
{
    constructor goes here
}

stackSkeleton::push (int x)
{ 
    increment the stack
}


int stackSkeleton::pop ()
{ 
    decrement the stack here
}


//Main
int main () 
{

your main operations that handle pop and push

}

hope this helps you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.