Hi there,
For my monthly programming project, I have to develop a boolean method that validates any password on any Web server. The user introduces the account name and its password, and the method returns true if the password belongs to that account. For example, if my Hotmail account is javan00b@hotmail.com and my password is Savitch, the program will run the following method:
System.out.println("Enter your user account");
String account=stdIn.readLine();
System.out.println("Enter your password");
String pass=stdIn.readLine();
boolean valid=validatePassword(account,pass);
if(valid) {System.out.println("Your password is valid");} else {System.out.println("Incorrect password");}
Running the program:
Enter your user account
javan00b@hotmail.com
Enter your password
savitch
Incorrect password
Please refrain from making n00b or stupid posts; I'll just ignore them, so don't waste your time. Just write helpful stuff.
For my monthly programming project, I have to develop a boolean method that validates any password on any Web server. The user introduces the account name and its password, and the method returns true if the password belongs to that account. For example, if my Hotmail account is javan00b@hotmail.com and my password is Savitch, the program will run the following method:
System.out.println("Enter your user account");
String account=stdIn.readLine();
System.out.println("Enter your password");
String pass=stdIn.readLine();
boolean valid=validatePassword(account,pass);
if(valid) {System.out.println("Your password is valid");} else {System.out.println("Incorrect password");}
Running the program:
Enter your user account
javan00b@hotmail.com
Enter your password
savitch
Incorrect password
Please refrain from making n00b or stupid posts; I'll just ignore them, so don't waste your time. Just write helpful stuff.