CS FundamentalsHardCognizant · Capgemini pattern
A function takes two integer inputs, each valid in the range 1–100. Using standard (non-robust) boundary value analysis that varies one variable at a time while the other stays at its nominal value, how many test cases are needed?
- A. 9
- B. 8
- C. 13
- D. 25
Correct answer: A. 9
Each variable takes min, min+, max−, max while the other is nominal (4 per variable), plus one case with both nominal: 4n + 1 = 4(2) + 1 = 9. Robust BVA would give 6n + 1 = 13; worst-case BVA 5² = 25.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- What is the cyclomatic complexity of this function? python def grade(m): if m >= 90: return "A" elif m >= 75: return "B" elif m >= 50…
- A developer runs git reset --soft HEAD~1 on a branch. What happens?
- A bad commit has already been pushed to a shared main branch that teammates have pulled. What is the safest way to undo it?
- When does git merge feature (run on main) produce a fast-forward instead of a merge commit?
- A stock-price service must notify every registered display widget whenever the price changes, without knowing the widgets' concrete…
- Your application expects a PaymentGateway interface, but the third-party library you must use exposes a different API. Which pattern lets…