posts - 58,  comments - 45,  trackbacks - 0

 

public   class  Student {
    Student(String name)
{
        
this .name = name;
    }

    
boolean  hasPassedCET4() {
        
//
    }

        
    
boolean  gotEnoughCredits() {
        
//
    }


    
private  age;
    
private  name;
}


class  GraduateStudent  extends  Student {
    
boolean  completedGraduateThesis() {
        
//    
    }

    Photo getPhoto()
{
        
//
    }

    
boolean  healthCheckUp() {
        
//
    }

    
void  stay() {
        
//
    }

    
void  leaveSchool() {}
    
void  enterAnotherSchool() {}
    
    
public   static   void  main(Sting[] args) {
        Student me
= new  GraduateStudent( " syl " );
        
if (me.hasPassCET4()
           
&&  me.gotEnoughCredits()
           
&&  me.completedGraduateThesis()) {
            me.getPhoto();
            
if  (me.healthCheckUp()) {
               me.leaveSchool();
               me.enterAnotherSchool();
            }
else {
               me.leaveSchool();
               me.gotoHospital();
               
while ( ! me.healthCheckUp())
                   
{}
               me.enterAnotherSchool();
            }

        }
else {
             me.stay();
        }

    }

}


posted on 2006-05-21 14:17 gosyl 阅读(301) 评论(0)  编辑  收藏 所属分类: j2se

只有注册用户登录后才能发表评论。


网站导航: