Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Provide C + + main.cpp Instuctions: Write a program that reads a line of text, changes each uppercase letter to lowercase, and places each letter

Provide C++ main.cpp
Instuctions: Write a program that reads a line of text, changes each uppercase letter to lowercase, and places each letter both in a queue and onto a stack.
The program should then verify whether the line of text is a palindrome (a set of letters or numbers that is the same whether read forward or backward).
If the input text is a palindrome, the program should print The line of text you entered is a palindrome.
If the input text is not a palindrome, the program should print The line of text you entered is not a palindrome.
I have four files myStack.h, queueADT.h, queueAsArray.h and stackADT.h. I dont think they are necessary but I will add queueADT.h and stackADT.h for better information.
queueADT.h:
#ifndef H_queueADT
#define H_queueADT
template
class queueADT
{
public:
virtual bool isEmptyQueue() const =0;
virtual bool isFullQueue() const =0;
virtual void initializeQueue()=0;
virtual Type front() const =0;
virtual Type back() const =0;
virtual void addQueue(const Type& queueElement)=0;
virtual void deleteQueue()=0;
};
#endif
stackADT.h
#ifndef H_StackADT
#define H_StackADT
template
class stackADT
{
public:
virtual void initializeStack()=0;
virtual bool isEmptyStack() const =0;
virtual bool isFullStack() const =0;
virtual void push(const Type& newItem)=0;
virtual Type top() const =0;
virtual void pop()=0;
};
#endif
I need help making a main.cpp for the four files. Take your time and make sure its runnable.
I am missing types stacktype and queuetype and methods addqueue and deletequeue in my original main.cpp.

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_2

Step: 3

blur-text-image_3

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions