<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    spring的最新用法...牛!!!

      1
      2import org.springframework.beans.BeanUtils;    
      3
      4   
      5public class People {     
      6    public class Contants {     
      7        public static final int 情人節 = 120;     
      8             
      9        public static final int THING_ROSE = 1;     
     10        public static final int THING_KISS = 2;     
     11        public static final int THING_HUG = 3;     
     12        public static final int THING_ANGRY = 4;     
     13        public static final int THING_OTHER = 5;     
     14             
     15        public static final double MONEY = 100000.00;     
     16        public static final int LOVE = 100;     
     17        public static final int AGE = 30;     
     18             
     19    }
         
     20    public static  class Boy {     
     21        private boolean 有車;     
     22        private boolean 有房;     
     23        private double 賺錢;     
     24        private int 年齡 = 15;     
     25             
     26        public Boy() {     
     27            super();     
     28        }
         
     29        public Boy(boolean isOwnCar,boolean isOwnHouse) {     
     30            有車 = isOwnCar;     
     31            有房 = isOwnHouse;     
     32        }
         
     33        public Boy(boolean isOwnCar,boolean isOwnHouse,double partMoeny) {     
     34            有車 = isOwnCar;     
     35            有房 = isOwnHouse;     
     36            賺錢 = partMoeny;     
     37        }
         
     38             
     39        public void setBoy(Boy boy) {     
     40            BeanUtils.copyProperties(this, boy);     
     41        }
         
     42        public boolean  givegirl(int thing) {     
     43            switch(thing) {     
     44            case Contants.THING_ROSE:     
     45            case Contants.THING_KISS:     
     46            case Contants.THING_HUG:     
     47                return true;     
     48            case Contants.THING_ANGRY:     
     49            case Contants.THING_OTHER:     
     50                return false;     
     51            }
         
     52            return false;     
     53        }
         
     54        public void 拼命賺錢() {     
     55            賺錢 ++;     
     56        }
         
     57        public int get年齡() {     
     58            return 年齡;     
     59        }
         
     60        public void set年齡(int 年齡) {     
     61            this.年齡 = 年齡;     
     62        }
         
     63        public boolean is有車() {     
     64            return 有車;     
     65        }
         
     66        public void set有車(boolean 有車) {     
     67            this.有車 = 有車;     
     68        }
         
     69        public double get賺錢() {     
     70            return 賺錢;     
     71        }
         
     72        public void set賺錢(double 賺錢) {     
     73            this.賺錢 = 賺錢;     
     74        }
         
     75        public boolean is有房() {     
     76            return 有房;     
     77        }
         
     78        public void set有房(boolean 有房) {     
     79            this.有房 = 有房;     
     80        }
         
     81             
     82    }
         
     83    public static  class Girl {     
     84        private boolean 等;     
     85        private int 感情;     
     86        private int 生日;     
     87             
     88             
     89        public Boy 嫁給(Boy boy) {     
     90            return boy;     
     91        }
         
     92        public boolean is等() {     
     93            return 等;     
     94        }
         
     95        public void set等(boolean 等) {     
     96            this.等 = 等;     
     97        }
         
     98        public int get感情() {     
     99            return 感情;     
    100        }
         
    101        public void set感情(int 感情) {     
    102            this.感情 = 感情;     
    103        }
         
    104        public int get生日() {     
    105            return 生日;     
    106        }
         
    107        public void set生日(int 生日) {     
    108            this.生日 = 生日;     
    109        }
         
    110    }
         
    111         
    112    public  boolean loveLoad(Boy boy,Girl girl) {     
    113        if (boy.is有房() && boy.is有車()) {     
    114            boy.setBoy(null);     
    115            girl.嫁給(boy);     
    116        }
     else {     
    117            if(girl.is等()) {     
    118                System.out.println("====1");     
    119                while (! (boy.get賺錢() > Contants.MONEY && girl.感情 > Contants.LOVE && boy.get年齡() < Contants.AGE)) {     
    120                    System.out.println("====2");     
    121                    for(int day = 1; day < 365 ; day ++{     
    122                        System.out.println("====3");     
    123                        if(day == Contants.情人節) {     
    124                            if(boy.givegirl(Contants.THING_ROSE)) {     
    125                                girl.set感情(girl.get感情() + 1);     
    126                            }
     else {     
    127                                girl.set感情(girl.get感情() - 1);     
    128                            }
         
    129                        }
         
    130                        if(day == girl.get生日()) {     
    131                            if(boy.givegirl(Contants.THING_ROSE)) {     
    132                                girl.set感情(girl.get感情() + 1);     
    133                            }
     else {     
    134                                girl.set感情(girl.get感情() - 1);     
    135                            }
         
    136                        }
         
    137                        boy.拼命賺錢();     
    138                    }
         
    139                    if(boy.is有房() && boy.is有車()) {     
    140                        boy.setBoy(null);     
    141                        girl.嫁給(boy);     
    142                        return true;     
    143                    }
         
    144                    boy.set年齡(boy.get年齡() + 1);     
    145                    girl.set感情(girl.get感情() - 1);     
    146                }
         
    147                if(boy.get年齡() > Contants.AGE) {     
    148                    girl.嫁給(new Boy());     
    149                    return false;     
    150                }
         
    151            }
     else {     
    152                girl.嫁給(new Boy());     
    153                return false;     
    154            }
         
    155        }
         
    156        return false;     
    157    }
         
    158    public  static void main(String []args) {     
    159        People people = new People();     
    160        Boy litterBoy = new Boy();     
    161        litterBoy.set年齡(15);     
    162        litterBoy.set有房(false);     
    163        litterBoy.set有車(false);     
    164        litterBoy.set賺錢(0.00);     
    165        Girl goodGirl = new Girl();     
    166        goodGirl.set生日(100);     
    167        goodGirl.set感情(0);     
    168        goodGirl.set等(true);     
    169        System.out.println(people.loveLoad(litterBoy, goodGirl));     
    170    }
     
    171
    172

    posted on 2008-05-03 14:28 ljgBean 閱讀(535) 評論(6)  編輯  收藏

    評論

    # re: spring的最新用法...牛!!! 2008-05-03 14:55 山風小子

    呵呵~被忽悠了 :)  回復  更多評論   

    # re: spring的最新用法...牛!!! 2008-05-03 20:57 BeanSoft

    !!!騙子!  回復  更多評論   

    # re: spring的最新用法...牛!!![未登錄] 2008-05-04 11:01 apple0668

    天啊,今天不是愚人節啊!被忽悠了。  回復  更多評論   

    # re: spring的最新用法...牛!!! 2008-05-04 14:45 三人行,必有我師焉

    常量拼寫是constant  回復  更多評論   

    # re: spring的最新用法...牛!!! 2008-11-11 15:09 你爹爹

    你媽個傻B,這東西幾十年前老子就寫過了。
    你看你寫的垃圾,關spring屁事啊。  回復  更多評論   

    # re: spring的最新用法...牛!!! 2010-02-03 14:03 nk

    怎么不關Spring的事?發春,發Spring!!!  回復  更多評論   


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2008年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    導航

    統計

    常用鏈接

    留言簿(1)

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 好看的电影网站亚洲一区| 久久久久se色偷偷亚洲精品av| a级片免费观看视频| 亚洲福利视频网址| 免费国产怡红院在线观看| 久爱免费观看在线网站| 久久亚洲中文无码咪咪爱| 国产亚洲美女精品久久久久狼| 两个人的视频高清在线观看免费| 一区二区免费在线观看| 亚洲福利一区二区| 免费看男女下面日出水视频| 久久久久免费看成人影片| 另类图片亚洲校园小说区| 亚洲第一香蕉视频| 亚洲国产精品狼友中文久久久| 免费v片在线观看视频网站| 免费无遮挡无遮羞在线看 | 免费日韩在线视频| 久久久久久AV无码免费网站| 在线观看亚洲专区| 亚洲毛片免费视频| 亚洲午夜国产片在线观看| a级毛片无码免费真人| 免费人成激情视频在线观看冫| 亚洲国产精品无码观看久久| 中文字幕亚洲综合久久2| 伊人久久精品亚洲午夜| 色www永久免费视频| 国产成人yy免费视频| 在线毛片片免费观看| 特级毛片aaaa级毛片免费| 亚洲人成自拍网站在线观看| 久久亚洲精品国产精品| 亚洲人成在线播放网站| 亚洲国产精品成人网址天堂| 韩国日本好看电影免费看| 日韩版码免费福利视频| 99久久人妻精品免费一区| 在线观看片免费人成视频播放| 污污视频免费观看网站|