import java.util.*;
import java.io.*;
public abstract class Generator {
	public void template(PrintWriter out) throws IOException {
		out.println("public class " + classe() + " {");
		Iterator it = getAtributos();
		while (it.hasNext()) {
			out.println(it.next());
		}
		out.println("   public static void main(String[] args) {");
		out.println(conteudo());
		out.println("   }");
		it = getMetodos();
		while (it.hasNext()) {
			out.println(it.next());
		}
		out.println("}");
	}
	
	public abstract String classe();
	public abstract String conteudo();
	public Iterator getMetodos() {
		return (new ArrayList()).iterator();
	}
	public Iterator getAtributos() {
		return (new ArrayList()).iterator();
	}
}
