✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Assume you have a specification of a program that allows users to search for a character in an existing string. The specification states that the user must input the length of the string and the character to search for. If the string length is out-of-range an error message “Integer out of range” will appear. If the character appears in the string, its position will be reported. If the character is not in the string the message “Character not found” will be output.
The input conditions (= causes) are as follows:
C1: Positive integer from 1 to 80
C2: Character to search for is in string
The output conditions (= effects) are:
E1: Integer out of range
E2: Position of character in string
E3: Character not found
Using the information given in the specification, how would you define the rules (= cause-effect relationships)?