public void UserChoice() { switch (dataInput.GetNextAction()) { case Action.Create: adressBook.CreatePerson(dataInput.GetPerson()); break; case Action.Find: Person person = adressBook.FindPerson(dataInput.Find()); dataInput.NullCheck(person); dataInput.PersonInformation(person); break; case Action.ListAll: dataInput.ReturnAllContacts(adressBook.ListAllContacts()); break; case Action.Delete: Person person1 = adressBook.FindPerson(dataInput.Delete()); dataInput.NullCheck(person1); adressBook.RemovePersonFromList(person1); break; case Action.Edit: Person person2 = adressBook.FindPerson(dataInput.Edit()); EditPerson(person2); break; } }