CS FundamentalsModerateTCS NQT · Infosys pattern
An age field accepts integers from 18 to 60 inclusive. Using equivalence partitioning only, what is the minimum number of test values needed to cover every class once?
- A. 2
- B. 3
- C. 6
- D. 7
Correct answer: B. 3
Classes: below 18 (invalid), 18–60 (valid), above 60 (invalid) → one value each = 3. 6 or 7 values come from boundary value analysis, a different technique.
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
- Counting each simple condition in a compound boolean expression as a separate decision, what is the cyclomatic complexity of this…
- A program's control flow graph has two separate connected components (for example, main and one called function drawn separately), with 14…
- How many of the following statements about cyclomatic complexity are correct? 1. It equals the number of linearly independent paths…
- A function has three integer inputs. How many test cases does worst-case boundary value analysis (every combination of min, min+, nom…
- main has commits A–B–C. Branch feature was created from B and has commits D–E. On feature you run git rebase main. How many of these…
- How many of the following statements about git reset are correct? 1. git reset --mixed HEAD~1 removes the last commit and leaves its…