import java.io.*;
import java.util.Stack;

public class OrbitMap
{
    public static final String TEST_DATA = "testdata.txt";
    public static final String ORBITAL_DATA = "data.txt";

    public static final String COM_NAME = "COM";

    public static final String DELIMITER = "\\)";
    public static void main (String[] args)
    {
        boolean runVerify = false;
        String dataFile = ORBITAL_DATA;
        boolean dumpInput = false;

        for (int i = 0; i < args.length; i++)
        {
            if ("-help".equals(args[i]))
            {
                System.out.println("Usage: [-help] [-verify] [-dump]");
                System.exit(0);
            }

            if ("-verify".equals(args[i]))
            {
                runVerify = true;
                dataFile = TEST_DATA;
            }

            if ("-dump".equals(args[i]))
                dumpInput = true;
        }

        Stack<Planet> thePlanets = new Stack<Planet>();
        BufferedReader reader = null;

        try
        {
            File file = new File(dataFile);
            String line = null;
            String values[] = null;

            reader = new BufferedReader(new FileReader(file));

            while ((line = reader.readLine()) != null)
            {
                values = line.split(DELIMITER);
                thePlanets.push(new Planet(values[1], values[0]));
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }
    
        if (dumpInput)
        {
            printPlanets(thePlanets);

            System.exit(0);
        }
    }

    private static void printPlanets (Stack<Planet> solarSystem)
    {
        Planet thePlanet = null;

        while (!solarSystem.empty())
        {
            thePlanet = solarSystem.pop();

            System.out.println(thePlanet);
        }
    }
}
@@ -28,21 +28,52 @@
 va.util.
-Stack
+Vector;%0Aimport java.util.Enumeration
 ;%0A%0Apubli
@@ -938,21 +938,22 @@
         
-Stack
+Vector
 %3CPlanet%3E
@@ -970,21 +970,22 @@
 s = new 
-Stack
+Vector
 %3CPlanet%3E
@@ -1374,12 +1374,11 @@
 ets.
-push
+add
 (new
@@ -1849,21 +1849,22 @@
 lanets (
-Stack
+Vector
 %3CPlanet%3E
@@ -1895,67 +1895,95 @@
     
-Planet thePlanet = null;%0A%0A        while (!solarSystem.empty
+Enumeration%3CPlanet%3E iter = solarSystem.elements();%0A%0A        while (iter.hasMoreElements
 ())%0A
@@ -1996,32 +1996,39 @@
   %7B%0A            
+Planet 
 thePlanet = sola
@@ -2027,23 +2027,24 @@
 t = 
-solarSystem.pop
+iter.nextElement
 ();%0A
@@ -2102,10 +2102,99 @@
  %7D%0A    %7D
+%0A%0A    private int directOrbits (Vector%3CPlanet%3E solarSystem)%0A    %7B%0A        return 0;%0A    %7D
 %0A%7D

Update OrbitMap.java