Middle+
Suppose the algorithm for calculating the deposit rate depends on two parameters: - presence of a client subscription: A, B, C (preferably, the client should have it) - deposit term How do these parameters affect the rate: 1. Deposit term 1.1. up to 6 months -> rate 17% 1.2. more than 6 months -> rate 15% 2. Client subscription 2.1. Subscription A -> rate increases by 20% 2.2. Subscription B -> rate may increase by 1.5% Task: analyze the checks your colleague made and add to the list. You have no more than 5 minutes for this.
sobes.tech AI
Answer from AI
To verify the deposit rate calculation algorithm based on the term and subscription, the following checks should be considered:
- Checks based on the deposit term:
- Exactly 6 months — the rate should be 17%.
- Less than 6 months (e.g., 1 month) — the rate is 17%.
- More than 6 months (e.g., 7 months) — the rate is 15%.
- Boundary values (0 months, very long term).
- Checks based on subscription:
- No subscription — rate without increase.
- Subscription A — rate increases by 20% of the base.
- Subscription B — rate increases by 1.5% of the base.
- Subscription C — does not affect the rate according to the condition, verify that the rate does not change.
- Incorrect or unknown subscription values.
- Combinations of term and subscription:
- Up to 6 months + subscription A.
- More than 6 months + subscription B.
- Up to 6 months + no subscription.
- More than 6 months + subscription C.
- Verification of the correctness of the final rate calculation:
- For example, for a 5-month term and subscription A: rate = 17% + 20% of 17% = 20.4%.
- For a 7-month term and subscription B: rate = 15% + 1.5% of 15% = 15.225%.
-
Check for negative and zero values of the term — should be handled correctly or errors should be issued.
-
Check data types and input parameter formats.
Thus, the list of checks can be supplemented with boundary values, absence of subscription, invalid data, and verification of correct calculations considering the percentage increase.