一个IT人对人生旅程的理解(代码解析)
<P>这是我以前写的一小段代码,代表我对人生的理解,拿出来和大家分享一下.不要认为它只是一段普通的代码哦,细细的看,或许你会和我有相同的感受.</P><P>package nature;
import nature.Nature
import nature.Journey;
import nature.Person;
/**
* 人的一生就是一次旅程。
* 你的本质和你的对自己的认知决定了你的这次旅程是否精彩。
*
* @author特务小强
* @date2004-11-12
* @version 0.9.4
*/
public class Life extends Journey{
public void Life(){
supper();
}
public void Life(String startPlace,String endPlace,Srting toEndRoute){
supper(startPlace,endPlace,toEndRoute);
}
public boolean shallSuccess(Person person){
boolean hasSuccess = false;
try{
boolean isKnowStartPlaceOfSelf = person.isKnowStartPlaceOfSelf();
boolean isKnowEndPlaceOfSelf = person.isKnowEndPlaceOfSelf();
boolean isKnowToEndRouteOfSelf = person.isKnowToEndRouteOfSelf();
if(isKnowStartPlaceOfSelf && isKnowEndPlaceOfSelf && isKnowToEndRouteOfSelf){
hasSuccess = true;
}
}
catch(LifeException lifeexception){
hasSuccess = false;
lifeexception.noHelp("No help!");
}
return hasSuccess;
}
public static void main(String arg[]){
Nature nature = new Nature();
private String startPlace = nature.giveYouStartPlace();
private String endPlace = nature.giveYouEndPlace();
private Srting toEndRoute = nature.giveYouToEndRoute();
Life yourLife = new Life(startPlace,endPlace,toEndRoute);
Person yourself = new Person();
if(yourLife.shallSuccess(yourself)){
System.out.println("Have success!");
}
else{
System.out.println("Have not success!");
}
}
}
</P> <P>强!</P> 谢谢<b><FONT color=#16a000>wildsnow</FONT></b>的评价,或许这个是一大堆的代码,看的晕,所以大家都没给些评价哦,
页:
[1]