Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A program asks for the number of a month, a whole number from to . Suggest test data of each kind: normal, abnormal, extreme and boundary. Give the expected result of each test.
Normal data is accepted. Abnormal data should be rejected. Extreme data is the largest or smallest accepted value. Boundary data is the largest or smallest accepted value and the value next to it that is rejected. Find errors by dry-running with simple data and comparing with the expected result.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Normal. : accepted.
Abnormal. , or "May": rejected.
Extreme. and : both accepted.
Boundary. (accepted) with (rejected), and (accepted) with (rejected).
Answer: the largest extreme value is , and the rejected boundary value above the range is .
Watch out. A value such as is also abnormal: a month number must be a whole number.
Log in to join the discussion.
Loading…