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(); //not a good practice, creates coupling / dependency
            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.");
        }
Example #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");
        }
Example #5
0
        public void Promote()
        {
            var calculator = new RateCalculator(); //part of same assembly (internal)
            var rating     = calculator.Calculate();

            Console.WriteLine("promoted");
        }
Example #6
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");
        }
Example #7
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

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

            Console.WriteLine("This promoted has ben changed");
        }
Example #9
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promoted method.");
        }
        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.");
        }
Example #11
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            // this = customer object
            var rating = calculator.Calculate();

            Console.WriteLine("Promote logic changed.");
        }
Example #12
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");
        }
Example #14
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.");
        }
Example #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");
        }
Example #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");
        }
Example #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");
        }
Example #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"); */
        }
Example #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");
            }
        }
Example #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");
            }
        }
Example #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");
             * }*/
        }
Example #23
0
 public void Promote()
 {
     var calculator = new RateCalculator();
     var rating     = calculator.Calculate(this);
 }
Example #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);
 }
Example #25
0
 public void Promote()
 {
     var calculator = new RateCalculator();
     // passes 'this' as the customer object to the method
     var rating = calculator.Calculate(this);
 }