accountimpl.java
来自「《JAVA分布式程序设计》一书的源代码。」· Java 代码 · 共 74 行
JAVA
74 行
//package Bank;/** * @(#)AccountImpl.java * @author Qusay H. Mahmoud * Most of this code was generated by the idl2java compiler */ public class AccountImpl extends Bank._AccountImplBase { private float bal; /** Construct a persistently named object. */ public AccountImpl(java.lang.String name) { super(name); } /** Construct a transient object. */ public AccountImpl() { super(); } public AccountImpl(float balance) { bal = balance; } /** <p> Operation: <b>::Bank::Account::Deposit</b>. <pre> void Deposit( in float f ); </pre> </p> */ public void Deposit( float f ) { // IMPLEMENT: Operation bal += f; } /** <p> Operation: <b>::Bank::Account::Withdraw</b>. <pre> void Withdraw( in float f ); </pre> </p> */ public void Withdraw( float f ) { // IMPLEMENT: Operation bal -= f; } /** <p> Reader for attribute: <b>::Bank::Account::balance</b>. <pre> readonly attribute float balance; </pre> </p> */ public float balance() { // IMPLEMENT: Reader for attribute return bal; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?