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

3.53 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create a simple text editor in Python using a positional list Abstract Data Type ADT along with a cursor object you can follow these steps This will help you understand the structure and operations ... 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

Document Format (2 attachments)

PDF file Icon

6096ba966e740_27144.pdf

180 KBs PDF File

Word file Icon

6096ba966e740_27144.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!