public class user {
//定义用户的四个属性
private int uid;//用户id
private String uname;//用户名
private String upwd;//密码
private int oid;//旧用户id(update用)
/**
* oid构造方法,主要为修改用户信息的时候传递参数
*/
public user(int uid, String uname, String upwd, int oid) {
this.uid = uid;
this.uname = uname;
this.upwd = upwd;
this.oid = oid;
}
@Override
public String toString() {
return "user{" +
"uid=" + uid +
", uname='" + uname + '\'' +
", upwd='" + upwd + '\'' +
'}';
}
/**
* 构造方法,主要为删除用户信息的时候传递参数
*/
public user(int uid) {
this.uid = uid;
}
/**
* 构造方法,主要为增加用户信息的时候传递参数
*/
public user(int uid, String uname, String upwd) {
this.uid = uid;
this.uname = uname;
this.upwd = upwd;
}
public user() {
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public String getUpwd() {
return upwd;
}
public void setUpwd(String upwd) {
this.upwd = upwd;
}
public int getOid() {
return oid;
}
public void setOid(int oid) {
this.oid = oid;
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)