ADD file via upload

main
hnu202326010320 7 months ago
parent 92e2977ecb
commit cbcb7ee143

@ -0,0 +1,42 @@
/**
*
*/
public class User {
private String username;
private String password;
private String userType; // 小学、初中、高中
public User(String username, String password, String userType) {
this.username = username;
this.password = password;
this.userType = userType;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public String getUserType() {
return userType;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
User user = (User) obj;
return username.equals(user.username) && password.equals(user.password);
}
@Override
public String toString() {
return "User{" +
"username='" + username + '\'' +
", userType='" + userType + '\'' +
'}';
}
}
Loading…
Cancel
Save