I have a class AthleticCompetitionResults and want to create a class with method to return a object of this AthleticCompetitionResults initialized from line e.g.
Siim Susi;12.61;5.00;9.22;1.50;60.39;16.43;21.60;2.60;35.81;5.25.72
Which creational design pattern I should use to implement it?
public class AthleticCompetitionResults {
private Athletic athletic;
private float resultM100;
private float resultLongJump;
private float resultShotPut;
private float resultHighJump;
private float resultM400;
private float resultHurdles110m;
private float resultDiscusThrow;
private float resultPoleVault;
private float resultJavelinThrow;
private float resultM1500;
public AthleticCompetitionResults(Athletic athletic) {
this.athletic = athletic;
}
...
Aucun commentaire:
Enregistrer un commentaire