锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品国产欧美,一二三区精品视频,一区二区三区欧美日韩http://www.aygfsteel.com/luolin/category/20858.htmlzh-cnTue, 18 Aug 2009 15:07:04 GMTTue, 18 Aug 2009 15:07:04 GMT60璇諱功絎旇錛堥噸鏋刜鏀瑰杽鏃㈡湁浠g爜璁捐_絎叓绔犻噸鏂扮粍緇囨暟鎹級http://www.aygfsteel.com/luolin/archive/2009/08/18/291213.html鍦ㄤ粠鏈斁寮冪殑璺笂鍦ㄤ粠鏈斁寮冪殑璺笂Tue, 18 Aug 2009 13:02:00 GMThttp://www.aygfsteel.com/luolin/archive/2009/08/18/291213.htmlhttp://www.aygfsteel.com/luolin/comments/291213.htmlhttp://www.aygfsteel.com/luolin/archive/2009/08/18/291213.html#Feedback0http://www.aygfsteel.com/luolin/comments/commentRss/291213.htmlhttp://www.aygfsteel.com/luolin/services/trackbacks/291213.html1.Self Encapsulate Field

涓鴻繖涓猣ield寤虹珛getting/setting method,騫朵笖鍙氳繃榪欎簺鍑芥暟鏉ヨ闂甪ield.
渚嬶細
privte int low,high;
boolean includes(int arg){
    return arg>=low&&arg<=high;
}
閲嶆瀯涓猴細
private int low,high;
boolean includes(int arg){
    return arg>=getLow()&&arg<=getHigh();
}
int getLow(){return low;}
int getHigh(){return high;}

2.Replace Data Value with Object
灝嗕竴涓暟鎹」鍙樻垚涓涓璞°?br /> 3.Change Value to Reference
灝嗚繖涓疄鍊煎璞″彉鎴愪竴涓紩鐢ㄥ璞°?br /> 4.Change Reference to Value
灝嗕竴涓紩鐢ㄥ璞″彉鎴愬疄鍊煎璞°?br /> 渚嬶細
Class Currency{
private String code;
public String getCode()}
    return code;
}
private Currency(String code){
    this.code=code;
}
}
5.Replace Array with Object
浠ュ璞℃浛鎹㈡暟緇勶紝瀵逛簬鏁扮粍涓殑姣忎釜鍏冪礌錛屼互涓涓煎煙琛ㄧず涔嬨?br /> 渚嬶細
String[] row=new String[3];
row[0]="Liverpool";
row[1]="15";
閲嶆瀯涓猴細
Performance row=new Performance();
row.setName("Liverpool");
row.setWins("15");
6.Duplicate Observed Data
7.Change Unidirectional Association to Bidirectional
8.Change Bidirectional Association to Unidirectional


]]>
璁捐妯″紡錛堟娊璞″伐鍘傦級http://www.aygfsteel.com/luolin/archive/2009/08/18/291573.html鍦ㄤ粠鏈斁寮冪殑璺笂鍦ㄤ粠鏈斁寮冪殑璺笂Tue, 18 Aug 2009 13:01:00 GMThttp://www.aygfsteel.com/luolin/archive/2009/08/18/291573.htmlhttp://www.aygfsteel.com/luolin/comments/291573.htmlhttp://www.aygfsteel.com/luolin/archive/2009/08/18/291573.html#Feedback0http://www.aygfsteel.com/luolin/comments/commentRss/291573.htmlhttp://www.aygfsteel.com/luolin/services/trackbacks/291573.html 閫氳繃宸ュ巶綾誨垱寤烘煇涓瀵硅薄錛岃屼笉鏄洿鎺ヤ嬌鐢╪ew鍏抽敭瀛椼?br /> public class Computer(){
}
public class NoteBookComputer extends Computer(){
}
public abstract class ComputerFactory(){
    public abstract Computer createComputer();
}
public class NoteBookComputerFactory extends ComputerFactory{
     public Computer createComputer() {
         return new NoteBookComputer();
    }
}
client code:
ComputerFactory factory=new NoteBookComputerFactory();
Computer noteBook=factory.createComputer();


]]>
主站蜘蛛池模板: 石柱| 松滋市| 乐至县| 若羌县| 云浮市| 吉安县| 贺州市| 宣恩县| 英超| 永安市| 洛隆县| 巴林左旗| 濮阳市| 思茅市| 麻阳| 定边县| 壤塘县| 荣成市| 贺州市| 江阴市| 大安市| 吉木乃县| 广南县| 临沭县| 武山县| 祁阳县| 喀喇| 从化市| 富蕴县| 九江市| 台北市| 南平市| 商南县| 盱眙县| 福鼎市| 婺源县| 永定县| 普宁市| 台山市| 武功县| 稻城县|