Consider a simplified 00 design, shown in Figure 6.47, for a banking system. Accounts can be created
Question:
Consider a simplified 00 design, shown in Figure 6.47, for a banking system. Accounts can be created at the bank, and money can be deposited and withdrawn from the account.
An account is accessed by its account number. Use the Decorator design pattern to add two new banking features to the design:
(a) Overdraft protection: allows the customer to withdraw money when the account balance is zero; the total amount that can be withdrawn in this -feature is a predefined credit limit.
(
b) Transaction fee: charges the customer a fixed fee for each deposit and withdrawal transaction.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: