📄 acmeinvoicer.java
字号:
public class AcmeInvoicer
implements MenuUser
{
private final static String MENU[] =
{
"[I] Invoices", "[V] Inventory"};
private Inventory inventory = new Inventory();
private Menu menu = null;
public AcmeInvoicer()
{
menu = new Menu("Acme Invoicing System, Main Menu", MENU, this);
}
public void performAction(String command)
{
if (command.equalsIgnoreCase("I"))
{
menu = new Menu(Invoice.TITLE, Invoice.MENU,
new Invoice(inventory, Util.getString("Name")));
}
else if (command.equalsIgnoreCase("V"))
{
menu = new Menu(Inventory.TITLE, Inventory.MENU, inventory);
}
}
public static void main(String args[])
{
AcmeInvoicer ai = new AcmeInvoicer();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -