示例#1
0
        static void Main(string[] args)
        {
            BirdSwallow Swallow = new BirdSwallow();

            Swallow.IsEndangered = true;
            Swallow.livesInWater = false;
            Swallow.livesOnLand  = true;
            Swallow.Migrates     = true;

            BirdTurkey Turkey = new BirdTurkey();

            Turkey.livesInWater      = false;
            Turkey.livesOnLand       = true;
            Turkey.Migrates          = true;
            Turkey.IsEndangered      = false;
            Turkey.IsBrianScaredofIt = true;

            FishGobidine Gobidine = new FishGobidine();

            Gobidine.IsBrianScaredofIt = false;
            Gobidine.IsEndangered      = true;
            Gobidine.livesInWater      = true;
            Gobidine.livesOnLand       = false;
            Gobidine.Migrates          = false;

            FishGoldfish Goldfish = new FishGoldfish();

            Goldfish.IsEndangered = false;
            Goldfish.livesInWater = true;
            Goldfish.livesOnLand  = false;
            Goldfish.Migrates     = false;
        }
示例#2
0
        public static string FishFavFood()
        {
            FishGoldfish newGoldfish = new FishGoldfish();

            return(newGoldfish.FavoriteFood());
        }