Question: Write a simple text editor that stores and displays a string of characters using the positional list ADT, together with a cursor object that highlights

Write a simple text editor that stores and displays a string of characters using the positional list ADT, together with a cursor object that highlights a position in this string. A simple interface is to print the string and then to use a second line of output to underline the position of the cursor. Your editor should support the following operations in PYTHON.

left: Move cursor left one character (do nothing if at beginning).

right: Move cursor right one character (do nothing if at end).

insert c: Insert the character c just after the cursor.

delete: Delete the character just after the cursor (do nothing at end).

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!