import java.util.ArrayList;
import java.util.Iterator;


/**
 * The main for the shotgun program.
 * @author Owen Astrachan
 *
 */
public class Shotgun {
    
    public static void main(String[] args){
        ShotgunReader sr = new ShotgunReader(new SlowStrandFactory());
        ArrayList list = sr.readSequences();
        System.out.println("before reconstruction");
        if (list != null){
            Iterator it = list.iterator();
            while (it.hasNext()){
                IStrand s = (IStrand) it.next();
                System.out.println(s);
            }
        }
        System.out.println("after reconstruction");
        ShotgunReconstructor gunner = new ShotgunReconstructor(list);
        double time = gunner.doGun();
        list = gunner.getStrands();
        if (list != null){
            Iterator it = list.iterator();
            while (it.hasNext()){
                IStrand s = (IStrand) it.next();
                System.out.println(s);
            }
        }
        System.out.println("time for reconstruction "+time);
        System.exit(0);
    }
}
