示例#1
0
 static void Main(string[] args)
 {
     Rose  redRose     = new Rose();
     Lily  whiteLily   = new Lily();
     Poppy yellowPoppy = new Poppy();
     Tulip purpleTulip = new Tulip();
 }
示例#2
0
        static void Main(string[] args)
        {
            Rose myRose = new Rose()
            {
                Color         = "Red",
                Name          = "Rosey",
                Type          = "American Beauty",
                Cost          = 3.99,
                WaterSchedule = "Weekly",
                Thorny        = true,
                Fragrant      = "Very",
                StemLength    = 23.1
            };

            Lily myLily = new Lily()
            {
                Color         = "White",
                Name          = "Lil7",
                Type          = "Casa Blanka",
                Cost          = 2.99,
                WaterSchedule = "Weekly",
                Fragrant      = "Very",
                StemLength    = 15.6
            };

            Tulip myTulip = new Tulip()
            {
                Color         = "Pink",
                Name          = "Tulla",
                Type          = "Garden Tulip",
                Cost          = 4.99,
                WaterSchedule = "Weekly",
                Fragrant      = "Very"
            };

            Orchid myOrchid = new Orchid()
            {
                Color         = "Purple",
                Name          = "Margret",
                Type          = "Singaore Orchid",
                Cost          = 9.99,
                WaterSchedule = "Weekly",
                Fragrant      = "Very"
            };

            Buttercup myButtercup = new Buttercup()
            {
                Color         = "Yellow",
                Name          = "Buddy",
                Type          = "Meadow Buttercup",
                Cost          = 3.99,
                WaterSchedule = "Weekly",
                Fragrant      = "Very"
            };

            FlowerShop       MacsFlowerSHop = new FlowerShop();
            List <IBirthday> Arrangemnet    = MacsFlowerSHop.MakeBirthdayArrangement();
        }
示例#3
0
        public List <Ibirthday> MakeBirthdayArrangement()
        {
            List <Ibirthday> Arrangement = new List <Ibirthday> ();
            Tulip            Yellow      = new Tulip();

            Arrangement.Add(Yellow);
            Arrangement.Add(new Daffodils());
            return(Arrangement);
        }
示例#4
0
        static void Main(string[] args)
        {
            Rose      redRose         = new Rose();
            Irise     blueIrise       = new Irise();
            Tulip     whiteTulip      = new Tulip();
            Sunflower yellowSunflower = new Sunflower();

            FlowerShop       MacsFlowerShop = new FlowerShop();
            List <IBirthday> Arrangment     = MacsFlowerShop.MakeBirthdayArrangment();
        }
示例#5
0
        static void Main(string[] args)
        {
            Rose      redRose         = new Rose();
            Sunflower yellowSunflower = new Sunflower();
            Daisy     whiteDaisy      = new Daisy();
            Tulip     orangeTulip     = new Tulip();

            FlowerShop       MacsFlowerShop = new FlowerShop();
            List <IBirthday> Arrangment     = MacsFlowerShop.MakeBirthdayArrangment();
        }
示例#6
0
文件: Program.cs 项目: jansenv/csharp
        static void Main(string[] args)
        {
            Rose MrThorny = new Rose();

            MrThorny.Color         = "Purple";
            MrThorny.Name          = "Mr. Thorny";
            MrThorny.Type          = "Rose";
            MrThorny.Cost          = 4.99;
            MrThorny.WaterSchedule = "Every Tuesday at 3pm";
            MrThorny.Thorny        = true;
            MrThorny.Fragrant      = false;

            Gardenia Gardenia = new Gardenia();

            Gardenia.Color         = "White";
            Gardenia.Name          = "Ms. G";
            Gardenia.Type          = "Gardenia";
            Gardenia.Cost          = 1.00;
            Gardenia.WaterSchedule = "Every other week";
            Gardenia.IsAWeed       = false;
            Gardenia.Fragrant      = true;

            Orchid Orchid = new Orchid();

            Orchid.Color         = "Purple";
            Orchid.Name          = "Orc";
            Orchid.Type          = "Orchid";
            Orchid.Cost          = 29.00;
            Orchid.WaterSchedule = "Every 2 days";
            Orchid.IsAWeed       = true;
            Orchid.Fragrant      = true;

            Tulip Tulip = new Tulip();

            Tulip.Color            = "Rainbow";
            Tulip.Name             = "Tulip Terry";
            Tulip.Type             = "Tulip";
            Tulip.Cost             = 0.29;
            Tulip.WaterSchedule    = "Never";
            Tulip.CanTiptoeThrough = true;
            Tulip.Fragrant         = false;

            FlowerShop       MacsFlowerShop = new FlowerShop();
            List <IBirthday> Arrangement    = MacsFlowerShop.MakeBirthdayArrangement();
        }
示例#7
0
        static void Main(string[] args)
        {
            Rose myRedRose = new Rose {
                Color         = "Red",
                Name          = "Big Red",
                Type          = "Garden Rose",
                Cost          = 0.99,
                WaterSchedule = "Once a week",
                Thorny        = true,
                Fragrant      = true,
                StemLength    = 34,
            };
            Tulip myTully = new Tulip {
                Color         = "Yellow",
                Name          = "Tully",
                Type          = "Special",
                Cost          = 1.45,
                WaterSchedule = "Once a day"
            };
            Daisy myDaisy = new Daisy {
                Color         = "White",
                Name          = "Day",
                Type          = "Gerber",
                Cost          = 1.5,
                WaterSchedule = "Every day",
                StemLength    = 16,
            };
            Daffodils myDaff = new Daffodils {
                Color         = "Yellow",
                Name          = "Daffy",
                Type          = "SpringBloomer",
                Cost          = .50,
                WaterSchedule = "Every 3 days",
            };

            FlowerShop       MacsFlowershop = new FlowerShop();
            List <Ibirthday> Arrangement    = MacsFlowershop.MakeBirthdayArrangement();
        }
 public void addTulip(Tulip tulip)
 {
     Tulip.Add(tulip);
 }