CS 310 Data Structures

The objectives of this project are (1) the design and implementation of a simple " editor " for lines of text, and (2) giving you practice with a particular data structure: Sequences of strings implemented with dynamic doubly-linked lists of dynamically allocated C-strings. At this point, it would be very wise to read the specification below. After it, read the section on how to do the project. Then make sure you are familiar enough with the course contents featured in Main and Savitch's Chapters 4 and 5 required for the data structure implementation. All the Chapter 5 operations or certain variants of them will be needed for this project, except for list copying. Study the pseudo-code and sample implementations as necessary. The essentials will be covered in the upcoming lectures. When you begin draft design, creating some C++ files (RCS use required!) and the build script, and continue to complete the project, keep the this assignment sheet handy so you can consult it for details. (Maybe also use it to write notes and a " to-do " list.) 1 Specification of Commands, other inputs and actions This editor maintains for you (the user) a main list of text lines. The editor also has a cursor that marks, conceptually, the front of any one of the lines or the end of the list. Thus, if the list has n lines, the cursor will be at one of n + 1 positions. With various combinations of commands the you can reposition the cursor, print the line after the cursor, insert a line where the cursor is, delete lines, etc. The editor also maintains a cut-list which holds the lines that have been deleted, until the cut-list is cleared by various commands. One such command pastes the cut-list into the main list at the cursor position, and then clears the cut-list, which makes the cut-list empty. Note that editing of the characters inside each line is not to be done: The only things this project should do is manipulate entire lines, and do simple searches within lines. We will evaluate most of the functionality of your project work in the order of the description of the commands below. In Fixed Font Type: Each command or a general syntactic description of it is given first. Under some commands is given the exact text(s) or form of messages your program must print to report some …