Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA DATA STRUCTURES Write a line-based text editor. The command syntax is similar to the Unix line editor ed. The internal copy of the file

JAVA DATA STRUCTURES

Write a 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 Go to the top. Add text after current line until on its own line Delete current line Delete several lines. Change name of the current file (for next write) Go to a numbered line. Get help Like append, but add lines before current line. Move current line after some other line. dr num num f name gnum m num mr num num num Move several lines as a unit after some other line Toggle whether line numbers are displayed. Print current line Print several lines. Abort without write. Read and paste another file into the current file. Substitute text with other text. Copy current line to after some other line. Copy several lines to after some other line. Write file to disk. Exit with write Go to the last line Go up one line. Go down one line Print current line number. Search forward for a pattern. Search backward for a pattern. Print number of lines and characters in file pr num num q! r name s text text t num tr num num num x! / text ? text

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe how to measure the quality of work life.

Answered: 1 week ago

Question

What attracts you about this role?

Answered: 1 week ago

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago