上一期中使用到的其他类保持不变。
BankAccount的接口规范包含一个类范围的不变条件测试,即余额总要大于或等于0(对不起,不允许透支)。
The contract specification for BankAccount includes a class-wide invariant that the balance must always be greater than or equal to zero (sorry, no overdrafts allowed!).
ServiceClass 类的 if...else 逻辑分支保持不变(为了清晰起见)。
The ServiceClass class' if...else logic branch remains the same (for clarity).
应用推荐