Start Program like this: // Chapter 7 Validate Password import java.util.*; public class ch7 { public static void main(String[] args) { // Define variables Scanner input = new Scanner(System.in); String userPassword; // for input int userPasswordLength; int numUppercaseLetters = 0; // counter for uppercase int numLowercaseLetters = 0; // counter for lowerase int numNumbers = 0; // counter for digits boolean passwordIsInvalid = true; // changes to false when password is valid // continue looping as long as password is invalid while(passwordIsInvalid) { System.out.print("Please enter password >> "); userPassword = input.nextLine(); userPasswordLength = userPassword.length(); // get the length of the password // loop thru the password character by character for(int i = 0; i < userPasswordLength; i++) { char ch = userPassword.charAt(i); // get one character at a time // is character uppercase? if(Character.isUpperCase(ch)) numUppercaseLetters++; // add 1 to counter ixample of Program Run: Phe password was invalid. It did not have enough of the following : uppercase letters, iust be at least 2 lowercase letters, must be at least 3 digits, must be at least 3 Please enter password >> coast The password was invalid. It did not have enough of the following: uppercase letters, wust be at least 2 Please enter password >> coast2 The password was invalid. It did not have enough of the following: Please enter password cCoastz Valid password.