Practice using the stack abstract data type

Assignment Help Data Structure & Algorithms
Reference no: EM133661431

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: EM133661431

Questions Cloud

Explain the concept of failfast : What are the differences between PUSH and PULL systems? Explain the concept of FailFast.
Which reason below justifies use of contract warehousing : Which reason below justifies the use of contract warehousing? It requires more in-depth negotiations than public warehousing to secure.
Leadership should switch to more holistic model : leadership should switch to a more Holistic model, as then leaders would be able to pay closer attention to the bigger picture and long-term goals.
How many patients are impacted : Provide a detailed explanation. If this is a breach, indicate if this is a reportable breach and indicate how many patients are impacted.
Practice using the stack abstract data type : 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
Develop a presentation in favour of a statement : HLTH 6049- Develop a presentation in favour of a statement about a current issue or future trend in healthcare in Canada from the topics provided.
How effective is the firewall in the current network : What is the risk of just having a single router or switch within the Memphis office? How effective is the firewall in the current network?
How do you think this limiting of central power fit : How do you think this limiting of central power fit in with the Texas history and political culture of the state that you have learned so far
Dealing with extremis environments : Situatioal awareness, making plans, actung under uncertainty and dealing with extremis environments.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Explain benefits and disadvantages of each data structure

You will create a Word document to do following tasks: Describe your scenario company. Explain the benefits and disadvantages of each data structure.

  Explain spacewise efficient implementation two-stack data

Structure of such two-stack data type would consist of two arrays and two top pointers. Describe why this may not be a spacewise efficient implementation.

  Question related to ms excel

Discuss how do I insert a row in multiple tables on different sheets in the same workbook? I have twelve sheets, one for every month, and the sheets are exactly the same.

  Convert the following formulas from reverse polish to infix

Convert the following formulas from reverse Polish to infix.

  Design a bfs-based algorithm

Design a BFS-based algorithm (pseudo code) for directed graph that computes the total number of paths from vertex srcU to vertex destV.

  What is the average queue occupancy

What is the average queue occupancy - What is the average delay of a bit in the queue?

  How to use breadth-first search in the directed graph

In this exercise we will develop an algorithm to find the strong components of a directed graph G = (V , E). Recall that a vertex w ? V is reachable.

  Explain how to modify knuth-morris-pratt algorithm

Explain how to modify Knuth-Morris-Pratt algorithm to support patterns with these wild cards, and analyze modified algorithm. Your algorithm must find first substring in text which matches the pattern.

  Analyze the role cryptographic algorithms play

Analyze the role cryptographic algorithms play; you will go into depth on this topic in your first milestone assignment. How these algorithms could be utilized.

  Develop algorithms to manipulate collections

Develop algorithms to manipulate collection(s), with evaluated algorithm quality. You must use effective algorithms as studied in class.

  Do you observe any changes in cluster memberships

Draw the graphic for the healthy set, representing the values, healthy and unhealthy and what is the degree of membership to the fuzzy set healthy of person B who has a BMI of 26.2? And to the fuzzy set unhealthy?

  Define the algorithms within asymmetric cryptography

List and define the algorithms within Asymmetric and Symmetric Cryptography? To earn full points create an initial post, follow the 80/20 rule.

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