Engineering

My Section Practice Exercise 4.3.7: Password Checker Goint Let's C Write a program with a method called panemarched to return if the string is a valid password. The method should have the signature shown in the starter code. The pasword must be at least 8 characters long and may only consist of letters and digits. To pass the autograder, you will need to print the boolean return value from the Hint Consider creating a Suring that contains all the letters in the alphabet and a String that contains all digits. If the password has a character that isn't in one of those Strings, then it's an illegitimate password porcheck method. My Section racht 4.3.7: Password Checker Subesi ubmitted 1 public class Password 2-( 3 public static void main(String[] args) 5 public static void main(String[] args) { 6 //we import the input object first 7 Scanner input-new Scanner(System.in); 8 V/output the System 9 System.out.println("Please enter the Password. \n"); 10 7/Now we call the input object and take the String input 11 String passwordString - input.next(); 12 1/we parse the string and print the output 13 System.out.println(passwordCheck(passwordString)): 14 } 15- public static boolean passwordCheck(String password) { 16 // if length is more than equal to 8 AND 17 // password is a combination of characters from 18 // 0-9 OR A-Z or A-Z, we return true. 19 if(password, length()>-8 & password matches("[a-z0-9A-2]+){ 20 return true; 21 > 22 else 23 //This means is password is not valid. 24 return false; 25 3 26 1 27) < 13 ca I