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."); }
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 good to create objects inside a class method of another class var rating = calculator.Calculate(); Console.WriteLine("Promote logic change"); }
public void Promote() { var calculator = new RateCalculator(); var rating = calculator.Calculate(this); Console.WriteLine("Promote logic change"); }
public void Promote() { var calculator = new RateCalculator(); var rating = calculator.Calculate(this); Console.WriteLine("This promoted has ben changed"); }
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."); }
public void Promote() { var calculator = new RateCalculator(); // this = customer object var rating = calculator.Calculate(); Console.WriteLine("Promote logic changed."); }
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"); }
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."); }
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"); }
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"); }
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"); }
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"); */ }
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"); } }
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"); } }
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"); * }*/ }
public void Promote() { var calculator = new RateCalculator(); var rating = calculator.Calculate(this); }
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); }
public void Promote() { var calculator = new RateCalculator(); // passes 'this' as the customer object to the method var rating = calculator.Calculate(this); }