How to use a stack and reverse the text

Assignment Help Data Structure & Algorithms
Reference no: EM133655149

Reverse Text (txeT esreveR)

In this programming assignment, we are going to practice using the stack abstract data type. One common use of a stack is to reverse data. In this assignment we are going to allow the user to type in text or tell the program what input file to process to read in string data. While processing this data we are going to store each character into a stack (push). Once all of the data is stored in a stack, we are going to remove (pop) each character, printing each character which will be in reverse order. We will print this to an output file and "echo" print it to the console.

In this assignment. I want you to focus on how to use a stack and also how to make your code as reusable as possible. You will be graded on both using a stack properly and code re-usability.

You must use the stack data structure code from the book that has its own header and source code file just for the stack, a header and source code file for your "ItemType" (you could use a template). You must also turn in a driver source code file.

Do not use anything that would require you to include the libraries algorithm.h or vector.h or similar. If you have any questions about this, let me know before submitting the assignment.

It is ok to ignore white-space. In other words if your input file or the users input has spaces or return carriages in it, ignore those. Note: One way to test your stack code is to use 2 stacks, one to reverse the string, the other stack to put the string back to the original.

Example file list:
TestDriver.cpp
Stack.h
Stack.cpp ItemType.h
ItemType.cpp (Maybe Optional)
Input.dat

Reference no: EM133655149

Questions Cloud

Capture accurate data involving juvenile delinquency : Pretend you are a researcher trying to determine the best way to capture accurate data involving juvenile delinquency
Prosecutors spend most of their time working directly : Prosecutors spend most of their time working directly with other members of the courtroom work group.
Write three arguments to back up your thesis statement : Back Up What You Say: Write at least three arguments to back up your thesis statement. Briefly explain each argument in a sentence or two.
Write a paragraph for two audiences explaining an interest : Write a paragraph for two audiences explaining an interest you have or activity you like to do. Describe why this interest is appealing to you or other people.
How to use a stack and reverse the text : How to use a stack and also how to make your code as reusable as possible. You will be graded on both using a stack properly and code re-usability
How does management know when a firm is ready to grow : How does management know when a firm is ready to grow? Why should businesses take on the task of training the hard-core unemployed?
Discuss the purpose and target population for current trend : Identify and describe at least one current trend in programs or interventions. Discuss the purpose and target population for the current trend.
Explain the development of the company and use graphs : Present a trend analysis and a common size. Explain the development of the company and use graphs for the most relevant points/ratios.
Analyze one of the poems from the readings in the book : Analyze one of the poems from the readings in the book or from the modules here on Bb. The purpose of this assignment is to explain your ideas about the poem

Reviews

len3655149

3/6/2024 9:20:08 PM

Hello, could you write this using Microsoft Visual Studio? The book used is C++ Plus Data Structures by Dale. Thank you!

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd