[Solved] Getters and Setters with interfaces has a parameter


The same way you deal with the regular fields in class:

Assumingv you have scoreStrategy and testStatistics fields:

public void setScoreStrategy(IScoreStrategy iScoreStrategy) {
    this.scoreStrategy = scoreStrategy;
}
public IScoreStrategy getScoreStrategy() {
    return scoreStrategy;
}
public ITestStatistics getTestStatistics() {
    return testStatistics;
}
// ...

1

solved Getters and Setters with interfaces has a parameter