Question: Question: The Length Of The Array Is Arbitrary; The Size Will Determine How Many Lines The Document Can Contain. For The Purpose Of This The

Question:The Length Of The Array Is Arbitrary; The Size Will Determine How Many Lines The Document Can Contain. For The Purpose Of This

The length of the array is arbitrary; the size will determine how many lines the document can contain. For the purpose of this assignment set this array to at least 25 (declare this as a constant). Each node contains exactly 1 character. Each time a modification is made to the document, it is to be printed to the text area (Output), (see basic form example). Below is the form build method which you can freely use.

private void BuildForm(){ String[] RadioLabel = {"Insert","Delete","Replace"};

form = new BasicForm("Apply Edit","Exit");

form.addTextField("L","Line",4,15,10);

form.addTextField("S","Start",4,80,10);

form.addTextField("E","End",4,150,10);

form.addTextField("T","Text",30);

form.addRadioButtons("action","Edit Action",false,RadioLabel);

form.addTextArea("O","OutPut",20,40); }

You will need at least 2 classes defined, a node class and a main class. Your final implementation should conform to the assignment specifications. Deviation from the assignment specification will result in a significant loss of marks. Note that the purpose of the assignment is to practice linked list mechanics. Where do I begin? This is a linked list assignment, and thus will be the first time many of you have programmed using dynamic data structures. Your most common error will be, NullpointerExceptions. It is advisable that you program in small steps and test every method fully before commencing. Here is how I approached the development of this assignment.

1. Create a project with 2 classes, node class as specified and the main class. Both should be in a package called IV.

2. Write the methods to implement an Event loop that will drive the Basic Form, see 1p02. Test this with the given basic form.

3. Create the basic data structure, array to hold the document. Write a method to traverse this data structure and print it out to the Output field of the BasicForm each time Apply Edit is pressed. This is important since it will allow you to see what effects the editing commands had on your document.

4. Implement each of the commands in order, testing all cases for each to ensure behavior compliance.

5. Most importantly, start early.

(USING JAVA ONLY)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Programming Questions!