public abstract class User {private String userNo;//用户ID号(系统内唯一)private String name;//用户姓名private String userPw;//用户密码private int userType;//0-admin;1-teacher;2-student;public final static int USER_TYPE_ADMIN = 0;public final static int USER_TYPE_TEACHER = 1;public final static int USER_TYPE_STUDENT = 2;public User(String userNo,String name,String userPw,int userType){this.userNo = userNo;this.name = name;this.userPw = userPw;this.userType = userType;}public User(String userNo,String name,int userType){this(userNo,name,"11",userType);}public User(String userNo,String name){this(userNo,name,User.USER_TYPE_ADMIN);}public String getUserNo() {return userNo;}public void setUserNo(String userNo) {this.userNo = userNo;}public String getUserPw() {return userPw;}public void setUserPw(String userPw) {this.userPw = userPw;}public int getUserType() {return userType;}public void setUserType(int userType) {this.userType = userType;}public String getName() {return name;}public void setName(String name) {this.name = name;}public int verifyPassword(String userNo,String userPw){if(this.userNo.equals(userNo)&&this.userPw.equals(userPw)){return this.userType;}else{return -1;}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。