account.java

来自「通过图形用户界面输入一句话」· Java 代码 · 共 141 行

JAVA
141
字号
/**
 * 
 */
package com.hp.gdcc.training.homework39;

/**
 * @author yanshuo
 * 
 */
public class Account {
	/**
	 * 账户号码
	 */
	private long id;

	/**
	 * 账户密码
	 */
	private String password;

	/**
	 * 真实姓名
	 */
	private String name;

	/**
	 * 身份证号码
	 */
	private String personId;

	/**
	 * 客户的电子邮箱
	 */
	private String email;

	/**
	 * 账户余额
	 */
	private double balance;

	/**
	 * 帐户类型
	 */
	private int accountType;

	/**
	 * 构造方法
	 */
	public Account() {

	}

	/**
	 * @param id
	 * 
	 * 有参的构造方法。用于设置必要的属性
	 */
	public Account(long id, String password, String name, String personId,
			String email, int accountType) {
		this.id = id;
		this.password = password;
		this.name = name;
		this.personId = personId;
		this.email = email;
		this.accountType = accountType;
	}

	/**
	 * 存款方法
	 */
	public boolean deposit(double depositAmount) {
		this.balance += depositAmount;
		return true;
	}
	
	/**
	 * 取款方法
	 */
	public boolean withdraw(double withdrawAmount) {
		// extends class TODO;
		return true;
	}
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPersonId() {
		return personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}


	public int getAccountType() {
		return accountType;
	}

	public void setAccountType(int accountType) {
		this.accountType = accountType;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?