class Task1 { public static Codegen create () throws CodegenException { return new MySolution (); } } class MySolution implements Codegen { ... public String codegen ( Program p ) throws CodegenException { ... } }