Answer on Question #37597- Programming- Other
Description of variables:
Count – quantity of entered PIN Code tries
Count1 – quantity of entered PUK Code tries
CorrectPINExit – flag, indicate correctly entered PIN Code
PUKExit – flag, indicate correctly entered PUK Code
Description of flowchart:
p1. First time initialization of variables Count, Count1, CorrectPINExit
p2. We are entering PIN Code
p3. Compare PIN Code with "0123". IF PIN Code entered correctly, we are going to p4, else to p5
p4. Set CorrectPINExit to true, i.e. PIN Code entered correctly
p5. Add 1 to quantity of entered PIN Code tries
p6. Compare Count with 3. IF Count=3 then go to p7, else pass this fragment of PUK Code Enter
p7. Display "Invalid PIN Code"
p8. Reset Count to 0, Initialisation Count1, set PUKExit to false
p9. We are entering PUK Code
p10. Compare PUK Code with 1234. IF PUK Code entered correctly, we are going to p11, else to p12
p11. Set PUKExit to true, i.e. PUK Code entered correctly
p12. Add 1 to quantity of entered PUK Code tries
p13. Compare Count1 with 3. IF Count1=3 or PUKExit is true, then go to p14, else return to PUK Code Enter
p14. IF Count1=3 or PIN Code entered correctly, then go to p15, else return to PIN Code Enter
p15. Look the value of CorrectPINExit. IF PIN Code entered correctly, then go to p16, else to p17
p16. Display "Welcome to DLM Telecom"
p17. Display "SIM Blocked"