Пример #1
0
        static void Main(string[] args)
        {
            // Classes and Objects
            Donuts appleCinn = new Donuts();

            appleCinn.Filling   = "Apple Pie";
            appleCinn.isSpecial = false;
            appleCinn.price     = 0.99m;
            appleCinn.Type      = "Filled";

            Console.WriteLine(appleCinn.Filling);

            Donuts longJone = new Donuts();

            longJone.Filling   = "Bavarian Creme";
            longJone.isSpecial = true;
            longJone.price     = 1.25m;
            longJone.Type      = "Filled";

            Console.WriteLine("A Longjohn cost about {0:C}", longJone.price);
            //Challenge



            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Donuts appleCinn = new Donuts();

            appleCinn.Filling   = "apple pie";
            appleCinn.IsSpecial = false;
            appleCinn.Price     = 0.99M;
            appleCinn.Type      = "Filled";
            Console.WriteLine(appleCinn.Price);

            Donuts longJohn = new Donuts();

            longJohn.Filling   = "Bavarian Creme";
            longJohn.IsSpecial = true;
            longJohn.Price     = 1.25M;
            longJohn.Type      = "Filled";
            Console.WriteLine("A LongJohn cost about {0:C}", longJohn.Price);
            Console.ReadLine();
        }