Software Design and Development

Home > Software Design and Development > Core > Software Development Cycle > Stubs and flags

Answer

BEGIN Logon


set index = 1

set flag = -1

get userName

get userPassword

REPEAT


IF database[index].name = userName THEN




IF database[index].password = userPassword THEN





display “Registered user”

flag = index




ELSE display “Incorrect password. Please re-enter”





get userName

get userPassword

index = index - 1




ENDIF



ENDIF



index = index +1


UNTIL (index = last + 1) OR (flag <> -1)


IF (flag = -1) THEN



display “New user”


ENDIF

END Logon

Back to Stubs and flags



Neals logo | Copyright | Disclaimer | Contact Us | Help