static void Main(string[] args) { StandardMessages.WelcomeMessage(); Person user = PersonDataCapture.Capture(); bool isUserValid = PersonValidator.isValid(user); if (!isUserValid) { StandardMessages.EndApplication(); return; } AccountGenerator.CreateAccount(user); StandardMessages.EndApplication(); }
public static bool isValid(Person person) { // Checks to be sure the first and last names are valid if (string.IsNullOrWhiteSpace(person.FirstName)) { StandardMessages.DisplayValidationError("First Name"); return(false); } if (string.IsNullOrWhiteSpace(person.LastName)) { StandardMessages.DisplayValidationError("Last Name"); return(false); } return(true); }