📄 deposit.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: Deposit.java
package atm.transaction;
import atm.ATM;
import atm.Session;
import atm.physical.*;
import banking.*;
// Referenced classes of package atm.transaction:
// Transaction
public class Deposit extends Transaction
{
private int to;
private Money amount;
public Deposit(ATM atm, Session session, Card card, int i)
{
super(atm, session, card, i);
}
protected Message getSpecificsFromCustomer()
throws atm.physical.CustomerConsole.Cancelled
{
to = atm.getCustomerConsole().readMenuChoice("Account to deposit to", AccountInformation.ACCOUNT_NAMES);
amount = atm.getCustomerConsole().readAmount("Amount to deposit");
return new Message(1, card, pin, serialNumber, -1, to, amount);
}
protected Receipt completeTransaction()
throws atm.physical.CustomerConsole.Cancelled
{
atm.getEnvelopeAcceptor().acceptEnvelope();
atm.getNetworkToBank().sendMessage(new Message(2, card, pin, serialNumber, -1, to, amount), balances);
return new Receipt(atm, card, this, balances) {
{
detailsPortion = new String[2];
detailsPortion[0] = "DEPOSIT TO: " + AccountInformation.ACCOUNT_ABBREVIATIONS[to];
detailsPortion[1] = "AMOUNT: " + amount.toString();
}
};
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -