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.");
        }
예제 #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");
        }
예제 #5
0
        public void Promote()
        {
            var calculator = new RateCalculator(); //part of same assembly (internal)
            var rating     = calculator.Calculate();

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

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

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

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

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