package com.sample;private String Name;
private String Age;
private String Sex;
private String IsPartyMember;
private String Position;
private String School;
private String Cclass;
private String TeachingWay;
//设置名字
public void setName(String newValue){
this.Name = newValue;
}
//输出名字
public String getName(){
return Name;
}
//设置年龄
public void setAge(String newValue){
this.Age = newValue;
}
//输出年龄
public String getAge(){
return Age;
}
//设置性别
public void setSex(String newValue){
this.Sex = newValue;
}
//输出性别
public String getSex(){
if(Sex.equals("man")==true)
return "男";
else
return "女";
}
//设置是否是党员
public void setIsPartyMember(String newValue){
this.IsPartyMember = newValue;
}
//输出是否是党员
public String getIsPartyMember(){
if(IsPartyMember.equals("yes")==true)
return "是";
else
return "否";
}
//设置职称
public void setPosition(String newValue){
this.Position=newValue;
}
//输出职称
public string getPosition(){
if(Position.equals("01")==true)
return "助教";
if(Position.equals("02")==true)
return "讲师";
if(Position.equals("03")==true)
return "副教授";
if(Position.equals("04")==true)
return "教授";
}
}
};