# Rule 4 the student is a female and the other

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: below. Examination Problem of Example 11.6 Condition Statements Sexcode = Z Sexcode = F Percentage = &gt; 45 Percentage &lt; 60 Action Taken Calculate Percentage Decision Rule Number . 1 2 1 3 4 | 576 N Y Y Y N Y Y N N Y N - N Y X N N - Y - Write output data X Add 1 to Count X Read next student's record XXX X Write Count X Stop X Figure 11.13. Decision table for the examination problem of Example 11.6. Rule 1: The student is a female, and the percentage marks obtained is 45% or more, and the percentage marks obtained is less than 60%. The computer should write the output data, add 1 to Count, and then read the next student's record. It is a case of a female student who has passed in second division. Rule 2: The student is female, and the percentage marks obtained is 45% or more, and the percentage marks obtained is not less than 60%. The computer should directly read the next student's record without performing any other operation. It is the case of a female student who has scored 60% or more marks and hence is a first divisioner and not a second divisioner. Rule 3: The student is a female and the percentage marks obtained is not 45% or more. A dash (-) in this column against the last condition means that this condition is irrelevant in arriving at the action. In fact, if Percentage is not equal to or greater than 45, then it has to be less than 60. Percentage greater than or equal to 60 is logically impossible. Such conditions in the decision table, which are irrelevant in arriving at an action, are known as don't care conditions and are denoted by a dash. For this rule, the computer should directly read the next student's record without performing any other operation. It is the case of a female student who has scored less than 45% and hence she is not a second divisioner. Rule 4: The student is a female, and the other conditions are don't care conditions. The computer should calculate Percentage after adding marks of all subjects and then proceed to test further conditions. It is the...
View Full Document

Ask a homework question - tutors are online