Making 3 separate sorted linked lists from a text file
<p>Below is a representation of the text file I will be reading from (using Jfile reader).  I need to take the file and put it into </p>

<ol>
<li>a String for testing purposes </li>
<li>create 3 seperate single linked lists depending on what the user chooses in the GUI.  </li>
</ol>

<p>I have the user choose a new file when the GUI opens but I'm not sure where to go from there.  How to I convert the txt file to a single String, and then what do I use to make a single linked list.  </p>

<p>Do I first make an array of the text file and then convert it into a linked lists(s)  can someone show me how to make one of the 3?  I don't know how to sort the linked lists as well as  create them.</p>

<pre><code>/* To be used with cars.txt in the following format:
1001
Melville, George
Mercedes Benz
E320
2002
1002
Rowling, June
Ford
Mustang
2007
1003
Milne, Randall
Toyota
Camry
1998
1005
Patterson, Jimmy
Chrysler
Town and Country
2004
1006
Dickson, Richard
Chrysler
Sebring
2002
1007
Carle, Erica
Toyota
Sequoia
2003
1010
Wiz, Eric
Toyota
Celica
2007
*/
</code></pre>

<p>My code:</p>

<pre><code>import java.util.Vector;


/**
* This class that holds all the service order objects in the ordered linked-lists that 
 * keep the objects ordered based on a particular key. This class adds to the data structures 
 * (Start Service) and deletes from the data structures (Finish Service).  
 * It also returns the contents of the ordered linked lists.  
 *  /
public interface ServiceOrderManager {


/**
 * Creates a Service Order object and adds it to the ordered linked lists
 * @param orderNum Service Order Number
 * @param owner name of owner of car to be serviced
 * @param make make of car to be serviced
 * @param model model of car to be serviced
 * @param year year of car to be serviced
 * @return true if the startService was successful
 * @throws ServiceOrderInUseException if Service Order Number is already in use
 */
public boolean startService(int orderNum, String owner, String make, String model,     int year) throws ServiceOrderInUseException;

/**
 * Adds a Service Order to the ordered linked lists.  This is for testing purposes.  
 * Not intended to be used by the user
 * @param order a Service Order to be added to the ordered linked lists.
 * @return true if the startService was successful
 * @throws ServiceOrderInUseException if Service Order Number is already in use
 */
public boolean startService(ServiceOrder order) throws ServiceOrderInUseException;

/**
 * Removes the Service Order from the ordered linked lists using the service order number
 * @param orderNum Service Order Number
 * @return true if the finishService is successful
 * @throws ServiceOrderNotFoundException if the Service Order Number is not found
 */
public boolean finishService(int orderNum) throws ServiceOrderNotFoundException;


/**
 * Returns a two dimensional array of Strings.  This can be used to populate a JTable
 * @param key, how service orders are to be ordered 1 = service order number, 2 = owner name (last, first), 
 * 3 = make,model,year of car
 * @return a two dimensional array of Strings to populate a JTable
 */
public String[][] listByKeyTable(int key);

/**
 * Returns a Vector of Strings.  This can be used to populate a JList
 * @param key how service orders are to be ordered 1 = service order number, 2 = owner name (last, first), 
 * 3 = make,model,year of car
 * @return a Vector of Strings to populate a JList
 */
public Vector&lt;String&gt; listByKeyVector(int key);

/**
 * Returns a string with all the current Service Orders in the following format:
 * 
 *  Line    Information
 *  1       Order #  (integer)
 *  2       Name (last name, first name) (String)
 *  3       Make (String)
 *  4       Model (String)
 *  5       Year (String)
 *  ** No blank lines between Service Orders
 *  The orders are placed in the string in order by Service Order Number, i.e. 
 *  order# 1001 is before order# 3208
 * @return a String that can be used with a PrintWriter object to write to a file.
 */
public String outputFileFormat();
</code></pre>
