subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:40
Match the personality traits with their description
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How can you make your column headings stand out?
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Colby works as a shipping clerk for a major package delivery service. some of his daily tasks include tracking shipments and entering orders. which aspect of the information technology cluster would he most likely be trained in? a.networkingb.databasesc.hardwared.software
Answers: 2
You know the right answer?
I'm using Visual Studio to make a grocery app for school that includes usernames and passwords. I'm...
Questions
question
Mathematics, 02.11.2020 20:10
question
English, 02.11.2020 20:10
Questions on the website: 13722363