Question: Password Generator Generate a list of unique passwords. Your program should prompt the user for how many passwords they want to generate, then print the
Password Generator
Generate a list of unique passwords. Your program should prompt the user for how many passwords they want to generate, then print the list of passwords. All passwords should follow this pattern:
Begin with a random four-letter word. The starter code includes a static method to return a list of valid words.
One special character: ! @ # _ . * The starter code includes a static method to return an array of the special characters.
A two-digit number: 00-99
Five random alphabetic or numeric characters from: abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVEWXYZ0123456789. The starter code includes a method to return these characters as a String
The password rain_23A6vW9 is an example that meets these rules. Your program must include code that checks to see that all passwords are unique.
Complete the Java program PasswordGenerator, which is in the attached zip file. Implement the following methods:
main
Complete the code in the main method so that the program prompts for the number of passwords, then creates and prints the specified number of unique passwords. Refer to the Sample Output below.
createPassword
Complete the method public static String createPassword(). This method should return a password that meets the rules outlined above. Note that the starter code contains static methods to create four-letter words, special characters, and alphabetic/numeric characters.
isPasswordUnique
Write the method isPasswordUnique(). This method should take 2 parameters: the password to check and a String containing all unique passwords created so far. Return true if the password is unique.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
