在重構:Replace Temp with Query中,用查詢函數(query method)來取代totalAmount 和frequentRentalPoints這兩個臨時變量。首先用getTotalCharge()取代to
定義: 不要存在多餘一個導致類變更的原因。 public class Animal { public void breathe(String animal) { System.out.pri