You are on page 1of 6

Structured English

DISPLAY "Enter The ID number of the student "

GET idnum of the student

DISPLAY “Enter student's Name: "

DO consider input format

GET name of the student

DISPLAY “Enter student's physics grade: "

GET physics grade of the student

DISPLAY “Enter student's chemistry grade: "

GET chemistry grade of the student

DISPLAY “Enter student's mathematics grade: "

GET mathematics grade of the student

DISPLAY “Enter student's english grade: "

GET English grade of the student

DISPLAY “Enter student's computer science grade: "

GET comscience grade of the student

CALL function calculate to get overall grade


Tight English

1. DISPLAY "Enter The ID number of the student "


2. GET idnum of the student
3. DISPLAY “Enter student's Name: "
3.1. DO consider input format
4. GET name of the student
5. DISPLAY “Enter student's physics grade: "
6. GET physics grade of the student
7. DISPLAY “Enter student's chemistry grade: "
8. GET chemistry grade of the student
9. DISPLAY “Enter student's mathematics grade: "
10. GET mathematics grade of the student
11. DISPLAY “Enter student's english grade: "
12. GET English grade of the student
13. DISPLAY “Enter student's computer science grade: "
14. GET comscience grade of the student
15. CALL function calculate to get overall grade
Tight English
1. CALCULATE Percentage= (physics+chemistry+mathematics+english+comscience) /5.0
2. IF percentage>=90
2.1.1.THEN ASSIGN overall grade='A+'
2.2. ELSE IF percentage >=80
2.2.1.THEN ASSIGN overall grade ='A'
2.3. ELSE IF percentage >=75
2.3.1.THEN ASSIGN overall grade ='A-'
2.4. ELSE IF percentage >=70
2.4.1.THEN ASSIGN overall grade ='B+'
2.5. ELSE IF percentage >=65
2.5.1.THEN ASSIGN overall grade ='B'
2.6. ELSE IF percentage >=60
2.6.1.THEN ASSIGN overall grade ='B-'
2.7. ELSE IF percentage >=55
2.7.1.THEN ASSIGN overall grade ='C+'
2.8. ELSE IF percentage >=50
2.8.1.THEN ASSIGN overall grade ='C'
2.9. ELSE
2.9.1.THEN ASSIGN overall grade ='F'
3. END IF
Conditions and Actions Rules /Condition Alternatives

1 2 3 4 5 6 7 8 9

1. percentage>=90 Y N N N N N N N N
2. percentage >=80 N Y N N N N N N N
3. percentage >=75 N N Y N N N N N N
4. percentage >=70 N N N Y N N N N N
5. percentage >=65 N N N N Y N N N N
6. percentage >=60 N N N N N Y N N N
7. percentage >=55 N N N N N N Y N N
8. percentage >=50 N N N N N N N Y N

 ASSIGN overall grade='A+' X


X
 ASSIGN overall grade ='A'
 ASSIGN overall grade ='A-' X

 ASSIGN overall grade ='B+' X


 ASSIGN overall grade ='B' X

 ASSIGN overall grade ='B-' X


 ASSIGN overall grade ='C+' X

 ASSIGN overall grade ='C' X


 ASSIGN overall grade ='F' X
1.GET X
2.IF X/2 Not Equals to 0
2.1. THEN DISPLAY “It is odd”
3.ELSE
3.1. CALL Function even
4.ENDIF
Decision Table
Conditions and Actions Rules /Condition Alternatives
1 2
1.IF X/2 Equals to 0 Y N

*DISPLAY “It is even” X


*CALL Function odd X

Decision Tree
X/2 Equals to 0 DISPLAY “It is even”
2
1

X/2 not Equals to 0 3 CALL Function odd

-------------------------------------------------
GET X
IF X/2 Equals to 0
THEN DISPLAY “It is even”
ELSE
CALL Function odd
ENDIF
IF Student.dat file not found
THEN DISPLAY “File could not be found error”
GO BACK to initial stage
ELSE
DISPLAY Student Result Screen
WHILE Student.dat File is READ
CALL FUNCTION Show_tabular
END WHILE
ENDIF

Decision Table
Conditions and Actions Rules /Condition Alternatives
1 2
1. IF Student.dat file not found Y N

 DISPLAY “File could not be found error” X


 GO BACK to initial stage X
 DISPLAY Student Result Screen X
 WHILE READING Student.dat file X
CALL FUNCTION Show_tabular

Decision Tree

IF Student.dat file not


found
2  DISPLAY “File could not be found

1  GO BACK to initial stage
3

IF Student.dat file found


4  DISPLAY Student Result Screen
 error”
5  WHILE READING Student.dat file
CALL FUNCTION Show_tabular

You might also like