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();
    }
}

package com.vp.fact;

import com.vp.iface.Problem;
import com.vp.impl.DancingWithGooglers;
import com.vp.impl.RecycledNumbers;
import com.vp.impl.SpeakGooglerese;

public class SolutionFactory {
	
	public static Problem getInstance(int problem)
	{
		Problem s = null;
		
		switch(problem)
		{
			case 1: s= new SpeakGooglerese();
				   break;
			case 2: s= new DancingWithGooglers();
				  break;
			case 3: s= new 	RecycledNumbers();
				  break;
		}
		
		return s;
	}

	
}
