package _01_static.demo7;

public class Account {
    private String username;
    private String password;
    private int loginErrorCount;  // 登录失败次数

    public Account() {
    }

    public Account(String username, String password) {
        this.username = username;
        this.password = password;
        this.loginErrorCount = 0;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return loginErrorCount
     */
    public int getLoginErrorCount() {
        return loginErrorCount;
    }

    /**
     * 设置
     * @param loginErrorCount
     */
    public void setLoginErrorCount(int loginErrorCount) {
        this.loginErrorCount = loginErrorCount;
    }

    public String toString() {
        return "Account{username = " + username + ", password = " + password + ", loginErrorCount = " + loginErrorCount + "}";
    }
}
