Computers and Technology

I'm using Visual Studio to make a grocery app for school that includes usernames and passwords. I'm given all the code then it tells me to use search arrays to implement two functions. They should return true if the username and password is found in the arrays. But i can't seem to get the function and arrays right. Below is the code and I'm supposed to implement the array in the two empty functions at the bottom. Would really appreciate some help here, thanks Module Main
Friend blnLoggedIn As Boolean
Dim arrUsernames() As String = {"Admin", "Clerk", "Manager"}
Dim arrPasswords() As String = {"password", "password2", "password3"}

Sub Login(username As String, password As String)
blnLoggedIn = False
If VerifyUsername(username) And VerifyPassword(password) Then
'Find index for username
Dim userIndex As Integer
For loopIndex = 0 To arrUsernames. Length - 1
If arrUsernames(loopIndex) = username Then
userIndex = loopIndex
Exit For
End If
Next
'Check for password match
If arrPasswords(userIndex) = password Then
blnLoggedIn = True
Else
MessageBox. Show("Incorrect password.")
End If
End If
End Sub
Function VerifyUsername(username As String) As Boolean

End Function
Function VerifyPassword(password As String) As Boolean

End Function
End Module

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, ansonhunter8891
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, andrew412603
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
image
Computers and Technology, 24.06.2019 03:40, Eylul30
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i. e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
Answers: 2
image
Computers and Technology, 24.06.2019 07:00, Dkhaurithompson
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
Answers: 1
Do you know the correct answer?
I'm using Visual Studio to make a grocery app for school that includes usernames and passwords. I'm...

Questions in other subjects: