0
Answer

How do you write a pseudo code for fire fighting using Action Emergency Code(EAC)?

Nonki

Nonki

13y
1.7k
1
 

Procedural approach

Start

//initialize variables

1.       String : stUNNumber, stEAC;

a.       Boolean : found;

b.      Integer: g;

c.       ARRAY:  symbol OF [3] CHAR;

 

2.       IF (radNumber status = Checked )THEN

3.   stUNNumber = cboUNNumber .text;

4.   Read stUNNumber;

5.   WHILE (not end of file OR found =true)

6.       IF (stUNNUmber=  File.DetailLine )THEN

7.       stEAC  ----> File.DetailLine;

8.       found = true;

9.       Display stEAC; 

10.   ENDIF

11.   ENDWHILE

     12.  ENDIF

     13.  IF (radEAC status = Checked) THEN

14.   Read stEAC;

     15.  ENDIF

16.   16 .   symbol  ----> stEAC.TOCHARARRAY;

     17.  FOR i=0 to symbol.ARRAYLENGTH 

     18.  IF(symbol[i]=' 1')

a.       Display "Use Coarse  Spray" 

     19.  Else IF (symbol[i]= '2')  

a.       Display "Use Fine Spray"

     20.   Else IF (symbol[i]= '3')

a.       Display  Use Foam

     21.    Else IF (symbol[i]= '4')  

a.       Display Use Dry Agent     

     22.ENDIF

/

2     SWITCH symbol [i]

a.       CASE 'P':   "Display Can be violently or even explosively reactive , Liquid tight chemical protective clothing used  in combination with Breathing Apparatus, Dilute Spillage"

b.      CASE 'R': Display " Liquid tight chemical protective clothing used in combination with Breathing Apparatus Dilute spillage"

c.       CASE 'S': Display " Can be violently or even explosively reactiveWear Breathing Apparatus  and Dilute Spillage"

d.      CASE 'T': Display "Wear Breathing Apparatus  and Fire kit ,Dilute Spillage";

e.      CASE 'W':Display "Can be violently or even explosively reactive Contain Spillage";

f.        CASE 'X': Display "Liquid tight chemical protective clothing used in combination with Breathing Apparatus Contain spillage" ;

g.       CASE 'Y': Can be violently or even explosively reactiveLiquid tight chemical protective clothing used combination with BA Contain Spillage";

h.      CASE 'Z':Display "Wear Breathing Apparatus  and Fire kit, Contain Spillage";

24.   IF (symbol[i]= 'E')

a.       Display "Consider Evacuation"

25.   ENDIF

26.   ENDFOR

END