📄 savingsaccount.java
字号:
package Accounts;
import People.Customer;
import dslib.base.FormatUos;
/** A savings account. */
public class SavingsAccount extends RegularAccount
{
/** Construct a SavingsAccount from a customer
and an account number */
public SavingsAccount(Customer c, int n)
{
super(c, n);
}
/** Return a string representation of the SavingsAccount */
public String toString()
{
return "Savings account " + number + ": Owner " + owner.name()
+ "\n" + FormatUos.pad("", 11, 'l') + "Balance "
+ FormatUos.withDecimals(balance, 2) + "\n";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -