Uses a book to select three different random words to form 10,000 password.
- No two words can be exactly the same (e.g., “theAlicethe” isn’t allowed, but “the” and “The” are accepted). Otherwise, restart generation.
- The password must be at least 8 characters long but under 16 characters. Otherwise, restart generation.
- The password must contain an uppercase character. Otherwise, restart generation.
- The password must contain a lowercase character. Otherwise, stop generating passwords.
- The password must contain only one special (non-alphabetic) character without using Character class. Otherwise, restart generation.
- If all conditions are met, print the password, along with the number of password generation attempts that failed due to: having a newline character, having a single-character word, having the same words, not meeting the uppercase requirement, not meeting the lowercase requirement, not meeting the special character requirement.
OOP for CPU