Problem: Deeply nested if-else statements are difficulty to maintain and violates the open/closed principle. Solution: Refactor using the chain of responsibility (COR) pattern.