Jump to content

Welcome to Geeks to Go - Register now for FREE
Geeks To Go is a helpful hub, where thousands of friendly volunteers serve up answers and support. Get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message and all ads will be removed once you have signed in.
Create an Account Login to Account

Visual Logic Programming


  • Please log in to reply

#1
Sparklies

Sparklies

    Member

  • Member
  • PipPip
  • 11 posts
:tazz:
Hi.

I'm trying to write a program in Visual Logic using parallel arrays where:

1) you enter 5 usernames and 5 passwords into an array
2) you then get a dialog box asking for a username and password
3) if the username is not one of the 5, you get a pop-up saying "User not found"
4) if the username and password do not match, you get a pop-up saying "Username does not match Password"
5) if they DO match, you get a pop-up saying "Access Granted"

I know that I am entering the parallel arrays right.
I know that I am properly setting up the initial inputs

But how do I set up the logic statement to get the program to KNOW if the username exists and matches the password?

Can someone flowchart it for me?

  • 0

Advertisement


#2
gust0208

gust0208

    Member

  • Member
  • PipPipPip
  • 311 posts
Hello,

I am assuming by visual logic, you mean a logic flowsheet or pseudocode. Here is my look at the problem:

Initialize username array
Initialize password array
Enter user data into username and password array
Initalize username_input
Initialize password_input
Get username_input and password_input from user
Initialize username_array_index
Initialize password_array_index
[Check if username_input is in username array]
If NO -> output pop-up saying "User not found" and end program
If Yes -> store array index of username_input from username_array into username_array_index (should be a number from 1 to 5) and continue on with algorithm
[Check if password_input is in password array]
if No -> store "0" into password_array_index (no for sure there won't be a match)
if Yes -> store array index of password_input from password_array into password_array_index (a number from 1 to 5 again)
[Check to see if username_array_index is the same as password_array_index]
If No -> output pop-up saying "Username does not match password"
If Yes -> output pop-up saying "Access Granted"
End Program

Cheers and hope that helps out a bit with the logic.

Cheers,
Tom

:tazz:
Hi.

I'm trying to write a program in Visual Logic using parallel arrays where:

1) you enter 5 usernames and 5 passwords into an array
2) you then get a dialog box asking for a username and password
3) if the username is not one of the 5, you get a pop-up saying "User not found"
4) if the username and password do not match, you get a pop-up saying "Username does not match Password"
5) if they DO match, you get a pop-up saying "Access Granted"

I know that I am entering the parallel arrays right.
I know that I am properly setting up the initial inputs

But how do I set up the logic statement to get the program to KNOW if the username exists and matches the password?

Can someone flowchart it for me?


  • 0

#3
Sparklies

Sparklies

    Member

  • Member
  • PipPip
  • 11 posts
[Check if username_input is in username array]

If NO -> output pop-up saying "User not found" and end program

If Yes -> store array index of username_input from username_array into username_array_index

(should be a number from 1 to 5) and continue on with algorithm

[Check if password_input is in password array]

this is what I am having a problem with.

HOW do i tell the program to check?

  • 0

#4
gust0208

gust0208

    Member

  • Member
  • PipPipPip
  • 311 posts
Ok, I am not familiar with the programming language Visual Logic, but I can try to explain in pseudo code and perhaps use some Java. If you could provide any links to the programming language you are using, I would be able to look up the actual syntax.

To check the username array for the username_input, you will need to loop through each item in the array and then see if it matches the username_input.

for each array item in username array:
- store the array index in an integer variable
- see if that array value matches the user input

It will be the same process for checking the password array.

Cheers,
Tom

[Check if username_input is in username array]

If NO -> output pop-up saying "User not found" and end program

If Yes -> store array index of username_input from username_array into username_array_index

(should be a number from 1 to 5) and continue on with algorithm

[Check if password_input is in password array]

this is what I am having a problem with.

HOW do i tell the program to check?


  • 0

#5
starrz

starrz

    Member

  • Member
  • PipPip
  • 11 posts
I think you are in my class.LOL.
  • 0

Advertisement




Similar Topics: Visual Logic Programming     x


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

featured