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

Write a simple text editor, which stores and displays a string of characters using the positional list ADT, together with a cursor object that highlights a position in the string. The editor must support the following operations:
• 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 (if not at end).

Step by Step Solution

3.49 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create a simple text editor using the positional list ADT and a cursor object we would first crea... 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 Introduction to Algorithms Questions!