Re: Constructor Conundrum



SUPPLEMENTAL:

if you need _cs as an instance variable then the class down here is
much more appropriate:


public class ConcreteProblem extends AbstractProblem {
ConcreteSolver _cs;

public ConcreteProblem(ConcreteSolver _cs) { // perhabs change
to
private
super(_cs);
this._cs = _cs
_cs.setParam(/* ... */);
}

public static ConcreteProblem getInstance () {
ConcreteSolver _cs = new ConcreteSolver();
return new ConcreteProblem (_cs);
}
}

.