A banking system is developed with classes such as SavingsAccount and…
A banking system is developed with classes such as SavingsAccount and CurrentAccount, both containing a method calculateInterest(). Initially, both classes independently implement similar logic for interest calculation.
Later, during system updates, developers modify the interest formula in SavingsAccount but forget to update it in CurrentAccount. As a result, customers with different account types receive inconsistent interest calculations, even though the logic was originally the same.
Determine the reason for this inconsistency. Justify how the lack of optimization and poor implementation strategy caused this issue, and explain the correct OOP-based approach.
Sign up free to check your answer
Sign up freeLoading lesson…

