Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using java to write line-based text editor. The command syntax is similar to the Unix line editor ed. The internal copy of the file is

using java to write line-based text editor. The command syntax is similar to the Unix line editor ed. The internal copy of the file is maintained as a linked list of lines. To be able to go up and down in the file, you have to maintain a doubly linked list. Most commands are represented by a one-character string. Some are two characters and require an argument (or two). Support the commands shown below:

image text in transcribed
Command Function H Go to the top. PJ Add text after current line until . on its own line Delete current line. dr num num Delete several lines. f name Change name of the current file (for next write). 9 num Go to a numbered line. h Get help. Like append, but add lines before current line. mm num Move current line after some other line. mir num num num Move several lines as a unit after some other line. n Toggle whether line numbers are displayed. p Print current line. pr num num Print several lines. q! Abort without write. r name Read and paste another file into the current file. 5 text text Substitute text with other text. t num Copy current line to after some other line. tr num num num Copy several lines to after some other line. W Write file to disk. x! Exit with write. Go to the last line. Go up one line. Go down one line. Print current line number. / text Search forward for a pattern. ? text Search backward for a pattern. Print number of lines and characters in file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions

Question

provide example of object-oriented programming composition in C#

Answered: 1 week ago

Question

=+Using the quantity theory of money:

Answered: 1 week ago

Question

Dear tutors, Please I need help for this assessment

Answered: 1 week ago