📄 account.java
字号:
package Accounts;
import People.Customer;
/** Bank account for customers.
This class contains attributes that are common to all types of accounts. */
public abstract class Account
{
/** The account holder. */
protected Customer owner;
/** A unique number for each account. */
protected int number;
/** Amount of money in the acocunt. */
protected float balance;
/** Create a new account with a customer and a number. */
public Account(Customer c, int n)
{
owner = c;
number = n;
}
/** Return the owner of this account. */
public Customer owner()
{
return owner;
}
/** Return the account number. */
public int number()
{
return number;
}
/** Return the account balance. */
public float balance()
{
return balance;
}
/** Generate a listing of account activity. */
public abstract String generateMonthlyStmt();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -