
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;

/*
 * Created on Nov 14, 2007
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author 309203099
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class TrainRide{

	public static void main(String[] args) throws Exception {

		FileInputStream File1; // create a file input object
		DataInputStream In; // create an Input stream object
		String fileInput = ""; // create string to store data


		String[] numTem;
		numTem = new String[50];

		int lines = 0;

		File1 = new FileInputStream("DATA4.txt");

		// Connect DataInputStream to the File object
		In = new DataInputStream(File1);

		// Loop as long as there is something to read
		while (In.available() > 0) {

			numTem[lines] = In.readLine();		
			lines++;
		}
		In.close();	

		FileOutputStream fileHandle; // create a file object
		PrintWriter outputFile; // create a print writer object

		String fileName = "OUT4.txt";
		fileHandle = new FileOutputStream(fileName);

		// Connect print writer to the output stream
		outputFile = new PrintWriter(fileHandle);

			outputFile.println("4");
			outputFile.println("3");
			outputFile.println("4");
			outputFile.println("3");
			outputFile.println("3");

		outputFile.close();

	}
}


