public void Promote()
        {
            var calculator = new RateCalculator(excludeOrders: true);
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote logic changed");
        }
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating = calculator.Calculate(this);

            Console.WriteLine("Promote logic changed.");
        }
Beispiel #3
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("This promoted has ben changed");
        }
Beispiel #4
0
        public void Promote()
        {
            var calculator = new RateCalculator(); // Internal - accesibil din interiorul, din exteriorul clasei dar numai în cadrul assembly-ului
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote logic changed");
        }
        public void Promote()
        {
            var calculator = new RateCalculator(); //part of same assembly (internal)
            var rating     = calculator.Calculate();

            Console.WriteLine("promoted");
        }
        public void Promote()
        {
            var calculator = new RateCalculator(); //not a good practice, creates coupling / dependency
            var rating     = calculator.Calculate(this);

            Console.WriteLine("promote logic changed");
        }
Beispiel #7
0
        public void Promote()
        {
            var calculator = new RateCalculator(); // not good to create objects inside a class method of another class
            var rating     = calculator.Calculate();

            Console.WriteLine("Promote logic change");
        }
Beispiel #8
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promoted method.");
        }
Beispiel #9
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote logic change");
        }
        public void Promote()
        {
            //not best practice. creates coupling. use interface instead
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("promote logic changed.");
        }
Beispiel #11
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            // this = customer object
            var rating = calculator.Calculate();

            Console.WriteLine("Promote logic changed.");
        }
Beispiel #12
0
        public void Promote()
        {
            //NOTE: there is a better way to instantiate an object so that it's not here in another class. See the "Interfaces" lecture
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this); //'this' means we're passing the "Customer" object to the Calculate method

            Console.WriteLine("Promote logic changed.");
        }
Beispiel #13
0
        public void Promote()
        {
            ////Note, this is not best practice to instanticate a new RateCalculator here
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote Logic Changed.");
        }
        public void Promote()
        {
            var calculator = new RateCalculator();

            calculator.Calculate();

            Console.WriteLine("Promote Logic Changed");
        }
Beispiel #15
0
        public void Promote()
        {
            //  var rating = CalculateRating(true);
            // Console.WriteLine(rating == 0 ? "level 1 promotion" : "level 2 promotion");
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("promote logic changed");
        }
Beispiel #16
0
        public void Promote()
        {
            // RateCalculator() is visible because it's part of the same assembly
            // but not visible in Main()
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote logic accessible from Main().");
        }
        public void Promote()
        {
            //var rating = CalculateRating(excludeOrders: true);
            //if (rating == 0)
            //    Console.WriteLine("promoted to level 1");
            //else
            //    Console.WriteLine("promoted to lvl 2");

            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("promote logic changed");
        }
Beispiel #18
0
        public void Promote()
        {
            //var rating = CalculateRating(true);
            //if(rating == 1)
            //    Console.WriteLine("Promoted to level 1");
            //else
            //    Console.WriteLine("Promoted to level 2");

            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote change");
        }
Beispiel #19
0
        public void Promote()

        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote Logic is changed");

            /* var rating = CalculateRating(excludeOrders: true);
             * if (rating ==0)
             *  Console.WriteLine("Promotedto level 1");
             * else
             *  Console.WriteLine("Promotedto level 2"); */
        }
Beispiel #20
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            if (rating == 0)
            {
                Console.WriteLine("Promote to the Level 1");
            }
            else
            {
                Console.WriteLine("Promote to the Level 2");
            }
        }
Beispiel #21
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            if (rating == 0)
            {
                Console.WriteLine("You are promoted to Lvl.0");
            }
            else if (rating == 1)
            {
                Console.WriteLine("You are promoted to Lvl.1");
            }
            else
            {
                Console.WriteLine("You are promoted to Lvl.2");
            }
        }
Beispiel #22
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);



            Console.WriteLine("Promote logic chaged");



            /*var rating = CalculateRating();
             * if (rating == 0)
             * {
             *  Console.WriteLine("Promoted to level 1");
             *
             * }
             * else
             * {
             *  Console.WriteLine("Promoted to level 2");
             * }*/
        }
Beispiel #23
0
        public void Promote()
        {
            var calculator = new RateCalculator();

            Console.WriteLine("Promote");
        }
Beispiel #24
0
 public void Promote()
 {
     // Usually not good practice to instantiate a new object from within a method. Creates coupling / dependency
     var calculator = new RateCalculator();
     var rating     = calculator.Calculate(this);
 }
Beispiel #25
0
 public void Promote()
 {
     var calculator = new RateCalculator();
     // passes 'this' as the customer object to the method
     var rating = calculator.Calculate(this);
 }
Beispiel #26
0
 public void Promote()
 {
     var calculator = new RateCalculator();
     var rating     = calculator.Calculate(this);
 }
Beispiel #27
0
        static void Main(string[] args)
        {
            var customer = new Customer();

            Amazon.RateCalculator calculator = new Amazon.RateCalculator();
        }
 static void Main(string[] args)
 {
     var customer = new Customer();
     Amazon.RateCalculator calculator = new RateCalculator();
 }