Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java-programming. plese use simple code using jgrasp...!!!! This is a login validation program. You will check for valid login id and matching password. Create two

java-programming. plese use simple code using jgrasp...!!!!
This is a login validation program. You will check for valid login id and matching password.
Create two arrays: both of type string
The first array is loginID, fill it with 3 login ID's.
For example
String[] loginID = {JCamel, MJane,RainyDay};
Create a second array called passwords. Fill it with 3 passwords.
For example
String[] passwords = {12345,qwerty,password};
Processing
Ask the user for their login id.
The user enters a login id. You check that id against the String array of valid ids.
If it is not valid you tell them so and ask for a new login id. Keep asking till you get a valid id.
If the id is valid (it matches an ID in the array) then you ask them for a password.
You check their entered password against an array of matching passwords.
That is: the index number where you found the valid id needs to be used for the index to check the password.
For example, if you found the valid id at position 3 in the id array, then you go to position 3 in the password array to see if it matches.
If the password does not match, ask them to enter it again.
If it does match tell them they have a successful login.
Tip remember to user .equals() when comparing Strings.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why is it wise to bid conservatively in a common values auction?

Answered: 1 week ago

Question

% A woman

Answered: 1 week ago