You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package entity ;
/**
* 用户实体类
* 用于存储用户的基本信息:用户名、密码和用户类型(小学/初中/高中)
* 这是一个不可变类, 所有字段都是final的, 确保对象创建后状态不会被修改
*/
public class User {
private final String username ; // 用户名
private final String password ; // 密码
private final String type ; // 用户类型:小学、初中、高中
/**
* 构造函数
* @param username 用户名
* @param password 密码
* @param type 用户类型
*/
public User ( String username , String password , String type ) {
this . username = username ;
this . password = password ;
this . type = type ;
}
// Getter方法
public String getUsername ( ) { return username ; }
public String getPassword ( ) { return password ; }
public String getType ( ) { return type ; }
}