This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I need some help in starting to Write a program in Java that simulates a simple line editor which supports the following operations:
Each subsequent line, up to the next line editor command, will be inserted in the text. If there is a designated current line, each line is inserted before that current line. Otherwise each line is inserted at the end of the text
$delete m n
Each line in text between lines m and n inclusively will be deleted
$print m n
Display the lines m and n inclusively along with their line
numbers. If the parameters m and n are missing, print the
Line m becomes the current line. The program should display up to 3 lines of text along with their line numbers before
and after the current line depending on whether there is
enough text in the linked list
$search string Search for the string in the text. If found, display the line
that contains the first occurrence of the string
Terminates the execution
The input file will have commands as well as text and also incorrect commands. I need to store the input file info in a linked list.