Question: Write a Java program that does the following in sequence : Open and read the supplied input file ( cities.txt ) into a doubly-linked circular

Write a Java program that does the following in sequence:

Open and read the supplied input file (cities.txt) into a doubly-linked circular linked list

Display the original contents of your list

Add Canberra past the last item that you added to the data structure.

Display the updated data structure, after adding Canberra to the data structure.

Remove Perth from the data structure.

Display the updated data structure, after removing Perth from the data structure.

Replace Darwin with New London

Display the updated data structure, after replacing Darwin with New London.

Add Wagga Wagga in between Wollongong & Newcastle

Display the updated data structure, after adding Wagga Wagga.

Write the updated data structure to an output file (new_cities.txt).

For your solution to be complete, you must

get data from a supplied input data file

do the above operations on the data in a data structure

store the updated data structure in an output file

For your solution to be workable,

There should not be any error(s) of the following types in your solution. That is NO

syntax errors

run-time errors

You may want to set up a hand trace chart, showing the values of your variables as you move through the solution from one statement to the next.

You do NOT need to turn in any hand trace chart or any Raptor-generated flowchart.

You do NOT need to turn in any UML diagram.

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 Databases Questions!