Sobes.tech
Middle

Class equivalence task: the form calculates the square root, accepting integers from 10 to 99 as input. What are the equivalence classes?

sobes.tech AI

Answer from AI

Equivalence classes are groups of input data for which the system behaves the same way. For a form that accepts integers from 10 to 99 and calculates the square root, the following classes can be identified:

  1. Valid class: numbers from 10 to 99 inclusive — correct input, for which the function should correctly compute the square root.
  2. Invalid class — less than 10: numbers less than 10 (e.g., 9, 0, -5) — input outside the range, should be handled with an error or warning.
  3. Invalid class — greater than 99: numbers greater than 99 (e.g., 100, 150) — also outside the range.
  4. Invalid class — non-integer numbers: fractional or non-numeric values (e.g., 12.5, "abc") — if the form accepts only integers, such data should be rejected.

Thus, tests should cover at least one representative from each class to verify correct handling.