示例#1
0
        private void AddAnimal()
        {
            Console.Clear();
            Animal animal    = new Animal();
            var    breedList = Query.GetBreed();

            UserInterface.DisplayDictionary(breedList);
            animal.breed       = UserInterface.GetIntegerData("breed", "the animal's");
            animal.name        = UserInterface.GetStringData("name", "the animal's");
            animal.age         = UserInterface.GetIntegerData("age", "the animal's");
            animal.demeanor    = UserInterface.GetStringData("demeanor", "the animal's");
            animal.kidFriendly = UserInterface.GetBitData("the animal", "child friendly");
            animal.petFriendly = UserInterface.GetBitData("the animal", "pet friendly");
            animal.weight      = UserInterface.GetIntegerData("the animal", "the weight of the");
            var dietList = Query.GetDiet();

            UserInterface.DisplayDictionary(dietList);
            animal.diet = UserInterface.GetIntegerData("diet plan", "the animal's");
            var roomList = Query.GetLocation();

            UserInterface.DisplayDictionary(roomList);
            animal.location = UserInterface.GetIntegerData("room", "the animal's");
            Query.AddAnimal(animal);
        }