DDD Approach to Access External Information

前端 未结 4 1269
遇见更好的自我
遇见更好的自我 2020-11-30 11:58

I have an existing bank application classes as shown below. The banks account can be of SavingsBankAccount or FixedBankAccount. There is an operation called IssueLumpSumInte

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 12:55

    Things that strike me as weird:

    • Your IBankAccount has a method FreezeAccount, but I presume that all accounts would have quite similar behavior? Perhaps a BankAccount class is warranted that implements some of the interface?
    • AccountStatus should probably be an enum? What should happen if an account is "Forzen"?

提交回复
热议问题