public static bool Validate(Person person) { //Checks to be sure the first and last name are valid if (string.IsNullOrWhiteSpace(person.FirstName)) { StandardMessage.ValidateErrorMessage("first name"); return(false); } if (string.IsNullOrWhiteSpace(person.LastName)) { StandardMessage.ValidateErrorMessage("last name"); return(false); } return(true); }
static void Main(string[] args) { StandardMessage.WelcomeMessage(); Person user = PersonDataCapture.Capture(); bool isUserValid = PersonValidator.Validate(user); if (isUserValid == false) { StandardMessage.EndApplication(); } AccountGenerator.CreateAccount(user); StandardMessage.EndApplication(); }