I have this class
public class PersonValidation {
public bool validate(){
return caseOne() && caseTow() && caseTree() && caseFour();
}
private bool caseOne() { return true; }
private bool caseTwo() { return true; }
private bool caseTree() { return true; }
private bool caseFour() { return true; }
}
In future there will be more functions that will be call in validate function and it will be huge, If you see validate funcion it is returning this:
return caseOne() && caseTow() && caseTree() && caseFour();
I want something cleaner do you recommend some design patter for making it?
Aucun commentaire:
Enregistrer un commentaire