Software Engineering · Question 12 · Hard

Software Engineering question 12

A function accepts an integer age that is valid from 18 to 60. Using equivalence class partitioning with one valid class and one invalid class on each side, what is the minimum number of test cases?

  1. 2
  2. 4
  3. 3
  4. 6
Answer and explanation

Answer: C. 3

Explanation: There are three partitions: below 18 (invalid), 18 to 60 (valid) and above 60 (invalid). One representative value from each gives 3 test cases.

Previous: Good software design aims for which combination of cohesion and coupling? · Next: What happens after running git reset --soft HEAD~1?

Practise software engineering

Try a fresh set of software engineering questions with an explanation after every answer, free and without signing up: Software Engineering practice. Or sit a full placement mock test.

More software engineering questions

More technical & programming practice

Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge