package com.menzus.gcj._2012.qualification.c;

import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;

public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
    public CProcessorFactory(String inputFileName) {
	super(inputFileName);
    }

    @Override
    protected InputBlockParser<CInput> createInputBlockParser() {
	return new CInputBlockParser();
    }

    @Override
    protected OutputProducer<CInput, COutputEntry> createOutputProducer() {
	return new COutputProducer();
    }
}



import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;

public class TemplateClass {

	protected Scanner sc;
	protected BufferedWriter bw;
	protected int testCases = 0;
	File ficheroEntrada;
	File ficheroSalida;

	public TemplateClass() {

	}

	public TemplateClass(String nombreFicheroEntrada, String nombreFicheroSalida)
			throws Exception {
		
		ficheroEntrada = new File (nombreFicheroEntrada);
		ficheroSalida = new File (nombreFicheroSalida);
		sc = new Scanner(ficheroEntrada);
		testCases = sc.nextInt();
		bw = traeBufferSalida(ficheroSalida);
	}

	protected BufferedWriter traeBufferSalida(File ficheroSalida)
			throws Exception {
		return new BufferedWriter(new FileWriter(ficheroSalida));

	}
	
	protected void procesaTestCase() throws Exception{
		
	}

}
