示例#1
0
        static void Main(string[] args)
        {
            Chameleon newPet = new Chameleon("Rudy");

            for (int i = 0; i < 10; i++)
            {
                if (newPet.Weight == 0.7)
                {
                    newPet.Exercise();
                }
                else
                {
                    newPet.Consume();
                }
            }

            newPet.ChameleonData();
            newPet.Death();
        }