For example, a bank - account class might have a method to calculate a balance.
例如,一个银行帐号类可能具有一个计算余额的方法。
Listing 8 shows a similar implementation of the Account class.
清单8显示了account类的类似实现。
Now implement the withdraw method. The Account class should look like Listing 7
现在实施 withdraw 方法。
应用推荐