📄 printer.java
字号:
package SystemEntities;
import dslib.base.FormatUos;
/** A class to represent the system printer.
The current version just outputs to the screen. */
public class Printer
{
/** Output the balance information passed in via the parameters */
public static void printBalance(int accountID, float amount, int date)
{
String temp = "\nOn date " + date + " the balance for account number "
+ accountID + " is $" + FormatUos.withDecimals(amount, 2) + ".";
System.out.println(temp);
}
/** Output the deposit information passed in via the parameters */
public static void printDeposit(int accountID, float amount, int date)
{
String temp = "\nOn date " + date + " the amount $" + FormatUos.withDecimals(amount, 2)
+ " was deposited in the account with number " + accountID + ".";
System.out.println(temp);
}
/** Output the change in credit information passed in via the arguements */
public static void printChangeLoc(int accountID, float amount, int date)
{
String temp = "\nOn date " + date + " the line of credit for the account with number "
+ accountID + " was change to $" + FormatUos.withDecimals(amount, 2) + ".";
System.out.println(temp);
}
/** Output the month end statement passed in via the parameters */
public static void printStmt(String stmt)
{
System.out.println(stmt);
}
/** Output the listing of customer information passed in via the parameters */
public static void printCustomers(String listing)
{
System.out.println(listing);
}
/** Output the new account information passed in via the parameters */
public static void printOpenAccount(int accountID, int date, String name)
{
String temp = "\nOn date " + date + " account " + accountID
+ " was opened by " + name + ".";
System.out.println(temp);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -