Question: COSC 2 4 3 6 Lab 3 : Stacks Instructions Create a C + + program that utilizes a stack to simulate a text editor's

COSC 2436 Lab 3: Stacks
Instructions
Create a C++ program that utilizes a stack to simulate a text editor's "Undo" Function. You MUST use stacks in your implementation. You may use the standard library stack.
Input Files
The input file will contain multiple commands, representing modifications made to the string, separated by an endl. "Text" will never contain leading and/or trailing spaces.
Insert "text" appends "text" to the output string
Delete "text" deletes "text", which will always be a unique substring, from the output string.
Undo Reverts the previous command
Note: All possible warnings may not be given. If you think of an edge case, cover it in your code.
3. Output Files
Output the string at the end of your program's execution.
Account for spaces between every inserted string. Notice there are no spaces at the beginning or end,
Examples
\table[[input1.txt,output1.txt],[Insert "Hello",Hello World!],[Insert "World!",],[Delete "World!",],[Delete "asdf",],[Undo,],[inpu2. bxt,output2.txt],[Undo,]]
There are 10 differenct case scenarios that are tested and i have an argument manager.. so my Main function looks like this:
int main(int argc, char* argv[]){
ArgumentManager am(argc, argv);
ifstream input(am.get("input"));
ofstream command(am.get("command"));
ofstream output(am.get("output"));
could you please write out the code in c++. I'll thumbs up!
 COSC 2436 Lab 3: Stacks Instructions Create a C++ program that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!