IF Statements:

Draw the IF part of the flowchart and write the IF statements for the following questions. Note that you only need to pass in the IF statements for the grade. If you would like me to look at the logic flowchart, I would be happy to do that too! Assume a file with the following layout.

Columns

Data

1 - 5

ID-NO

6 - 25

NAME-IN

26 - 29

YR-BIRTH

30

MARITAL-STATUS Valid Codes: M, S, W, D

31

NUM-DEPEND

32

SEX Valid Codes: M, F

33 - 40

SALARY

41

OWN-HOME Valid Codes: Y, N

42 - 47

VALUE-HOME

  1. If the person is single and makes a salary over 25000, PERFORM B-310-PROCESS.
  2. If the person is male, and married and born since 1960 then PERFORM B-310-ROUTA otherwise PERFORM B-320-ROUTB.
  3. If the person is either single or has less than 2 dependents PERFORM B-310-ELIGIBLE otherwise PERFORM B-320-NOT-ELIGIBLE.
  4. If the person either makes over 40000 or owns their own home and it is worth over 120000 MOVE "ELIGIBLE" TO MSG-PR otherwise MOVE "NOT ELIGIBLE" TO MSG-PR.
  5. If the person is married and has more than 5 dependents MOVE MSG-1 TO MSG-PR, if the person is married and does not have more than 5 dependents MOVE MSG-2 TO MSG-PR, if the person is not married with more than 4 dependents MOVE MSG-3 TO MSG-PR, if the person is not married and does not have more than 4 dependents MOVE MSG-4 TO MSG-PR.