Question: Write a program to implement Undo Redo Functionality using stack. Your program should working like user is typing something on screen and when he/she


Write a program to implement Undo Redo Functionality using stack. Your program

Write a program to implement Undo Redo Functionality using stack. Your program should working like user is typing something on screen and when he/she press Ctrl+z then last character will be remove from screen and when he/she press again Ctrl+z then previous character will be remove from screen and if he/she press Ctrl+y then last removed character will display again on screen. Note: To write this program you first need to understand that how we can detect pressed key from user in python. I am writing C# code below for the sake of example. Consolekeylnfo input = Console.ReadKey(); while (input.Key != Consolekey.Enter) { if (!char.IsControl(input.KeyChar) { //Do some code when user press any printing character) else if (input. Modifiers Ctrl+Z Key } else if (input.Modifiers when user press Ctrl+Y Key} else if (input.Key backspace Key} }//End While Loop Consolekey.Z){ //Write some code when user press ConsoleKey.Y) {//Write some code ConsoleKey.Backspace) { //Write some code when user press ConsoleModifiers.Control && input.Key %3D3D ConsoleModifiers.Control && input.Key

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Program class Node def initself dataNone selfdata data selfnext None selfprev None def strself retur... View full answer

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 Algorithms Questions!