public class Student //创建一个Student类123
{
private int number; //定义“学号”
private String name; //定义“姓名”
private char sex; //定义“性别”
private String place; //定义“籍贯”
private String phoneNums; //定义“父母的联系方式”
public int getNumber() //获得“学号”
{
return number;
}
public void setNumber(int number) //设置“学号”
{
this.number = number;
}
public String getName() //获得“姓名”
{
return name;
}
public void setName(String name) //设置“姓名”
{
this.name = name;
}
public char getSex() //获得“性别”
{
return sex;
}
public void setSex(char sex) //设置“性别”
{
this.sex = sex;
}
public String getPlace() //获得“籍贯”
{
return place;
}
public void setPlace(String place) //设置“籍贯”
{
this.place = place;
}
public String getPhoneNums() //获得“父母的联系方式”
{
return phoneNums;
}
public void setPhoneNums(String phoneNums) //设置“父母的联系方式”
{
this.phoneNums = phoneNums;
}
}