Replace Parameter with Method
Remove the parameter and let the receiver invoke the method.
int basePrice = _quantity * _itemPrice;
discountLevel = getDiscountLevel();
double finalPrice = discountedPrice (basePrice, discountLevel);
![](http://www.refactoring.com/catalog/arrow.gif)
int basePrice = _quantity * _itemPrice;
double finalPrice = discountedPrice (basePrice);
For more information see page 292 of Refactoring
***** 아름다운프로님에 의해서 게시물 복사 + 카테고리변경되었습니다 (2003-12-18 17:27)