Menu

[solved]-Write Java Program Demonstrate Use Linked Lists Using Linkedlist Javautil Rather Creating Q39012196

Write a Java program to further demonstrate the use of linkedlists.

You will not be using the LinkedList from java.util. Rather, youwill be creating your own OrderedListclass. You should begin bygetting the IterableList in the notes and renameing it toOrderedList.

This exercise is intended to build the tools necessary tounderstanding complex memory management rather than using anarray-backed class like Vector. In addition, your class will havethe Iterablecapability that will allow you to use your classobjects in a foreach loop.

The key to this design is that the list will be ordered (sortedascending) and will not contain duplicates. Your code will maintainthis order. Refer to the class notes on the visual construction ofa linked list. The focus is on the insert() method.

The insert() method needs to account for duplicates and how itdetermine the position at which to insert into the list.

You will work with three file names provided (in the orderbelow) to your program on the command line:

  • d5.dat
  • d5.delete
  • outputfile [whatever you call it on the command line]

NOTE: The input file contains duplicatevalues!

You will produce an output file that contains all of d5.dat insorted order, minus the duplicates and minus any items specified ind5.delete.

Once you have processed the d5.dat file and the d5.delete file,it is a simple matter of iterating over the list and writing theobject data to the output file.

The output file size will be 22,725 or 27,270 bytes depending onyour platform and methods used.

The d5.dat and d5.delete contain text like the pictureuploadedSORN ACRE SCAM DEEP LILL EWTS NITE WICK ENDS BISE DISS YARE SMOG WARY GOEY BREN MALT LIEU HIST HUED GARB SNOG MAXI GOOD VERD

SORN ACRE SCAM DEEP LILL EWTS NITE WICK ENDS BISE DISS YARE SMOG WARY GOEY BREN MALT LIEU HIST HUED GARB SNOG MAXI GOOD VERD PISE OGRE SKIN AIRY Show transcribed image text SORN ACRE SCAM DEEP LILL EWTS NITE WICK ENDS BISE DISS YARE SMOG WARY GOEY BREN MALT LIEU HIST HUED GARB SNOG MAXI GOOD VERD PISE OGRE SKIN AIRY

Expert Answer


Answer to Write a Java program to further demonstrate the use of linked lists. You will not be using the LinkedList from java.util… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *