|
|
|
|
@ -26,10 +26,17 @@
|
|
|
|
|
private User currentUser; // 当前登录用户
|
|
|
|
|
private String currentType; // 当前题目类型
|
|
|
|
|
###方法:
|
|
|
|
|
public boolean login(String username, String password) // 用户登录验证
|
|
|
|
|
public void logout() // 用户退出登录
|
|
|
|
|
public boolean switchUserType(String newType) // 切换题目难度类型
|
|
|
|
|
public boolean isLoggedIn() // 检查用户是否已登录
|
|
|
|
|
public User getCurrentUser() // 获取当前用户信息
|
|
|
|
|
private void initializeUsers() // 初始化预设用户账户
|
|
|
|
|
public UserManager() // 构造函数
|
|
|
|
|
public boolean login(String username, String password)
|
|
|
|
|
// 用户登录验证
|
|
|
|
|
public void logout()
|
|
|
|
|
// 用户退出登录
|
|
|
|
|
public boolean switchUserType(String newType)
|
|
|
|
|
// 切换题目难度类型
|
|
|
|
|
public boolean isLoggedIn()
|
|
|
|
|
// 检查用户是否已登录
|
|
|
|
|
public User getCurrentUser()
|
|
|
|
|
// 获取当前用户信息
|
|
|
|
|
private void initializeUsers()
|
|
|
|
|
// 初始化预设用户账户
|
|
|
|
|
public UserManager()
|
|
|
|
|
// 构造函数
|
|
|
|
|
|