Please answer this question in Java code, submit a .java file called PasswordScanner, and create the following structure in Eclipse: ◦ Package Name: week13 ◦ Class Name: PasswordScanner Your boss has determined that employee passwords need to be updated and made stronger. The new password policy has the following requirements: • At least 8 characters in length • Must contain at least one upper-case character • Must contain at least one lower-case character • Must contain one number character • Must contain one of the following characters: @,#,%,-,&,* After a couple of weeks, your boss wants to know if all employee passwords now meet the new requirements. He has given you a text file (pwd.txt) and asked you to write a program that will scan the file and create two new files (invalidpwd.txt and validpwd.txt). All invalid passwords from pwd.txt will be written to invalidpwd.txt and all valid passwords from pwd.txt will be written to validpwd.txt. Download the Pwd.txt file and save it to the directory where you have your Java project. Write a program that: • Checks to see if the pwd.txt file exists in the current directory. If the file does not exist in the current directory, display an error message and stop the program. • Opens the pwd.txt file. • Creates the files invalidpwd.txt and validpwd.txt and opens them for writing. • Evaluates each password in the list one at a time to see if each one meets all requirements. • Writes all valid passwords to the validpwd.txt file and all invalid passwords to the invalidpwd.txt file with the reason the entry is not valid. • Displays messages to the user as shown in the example run. Break down the work of determining if a password is valid by writing four methods to check for each requirement. Your program should contain the following four methods: • hasUpper(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) upper case character and returns false if it does not. • hasLower(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) lower case character and returns false if it does not. • hasNumber(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) number and returns false if it does not. • hasSpecial(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) of the designated special characters and returns false if it does not. Special Character List: ['@','#','%','-','&','*']
Please answer this question in Java code, submit a .java file called PasswordScanner, and create the following structure in Eclipse: ◦ Package Name: week13 ◦ Class Name: PasswordScanner Your boss has determined that employee passwords need to be updated and made stronger. The new password policy has the following requirements: • At least 8 characters in length • Must contain at least one upper-case character • Must contain at least one lower-case character • Must contain one number character • Must contain one of the following characters: @,#,%,-,&,* After a couple of weeks, your boss wants to know if all employee passwords now meet the new requirements. He has given you a text file (pwd.txt) and asked you to write a program that will scan the file and create two new files (invalidpwd.txt and validpwd.txt). All invalid passwords from pwd.txt will be written to invalidpwd.txt and all valid passwords from pwd.txt will be written to validpwd.txt. Download the Pwd.txt file and save it to the directory where you have your Java project. Write a program that: • Checks to see if the pwd.txt file exists in the current directory. If the file does not exist in the current directory, display an error message and stop the program. • Opens the pwd.txt file. • Creates the files invalidpwd.txt and validpwd.txt and opens them for writing. • Evaluates each password in the list one at a time to see if each one meets all requirements. • Writes all valid passwords to the validpwd.txt file and all invalid passwords to the invalidpwd.txt file with the reason the entry is not valid. • Displays messages to the user as shown in the example run. Break down the work of determining if a password is valid by writing four methods to check for each requirement. Your program should contain the following four methods: • hasUpper(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) upper case character and returns false if it does not. • hasLower(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) lower case character and returns false if it does not. • hasNumber(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) number and returns false if it does not. • hasSpecial(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) of the designated special characters and returns false if it does not. Special Character List: ['@','#','%','-','&','*']
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
Please answer this question in Java code, submit a .java file called PasswordScanner, and create the following structure in Eclipse:
◦ Package Name: week13
◦ Class Name: PasswordScanner
Your boss has determined that employee passwords need to be updated and made stronger. The new password policy has the following requirements:
• At least 8 characters in length
• Must contain at least one upper-case character
• Must contain at least one lower-case character
• Must contain one number character
• Must contain one of the following characters: @,#,%,-,&,*
After a couple of weeks, your boss wants to know if all employee passwords now meet the new requirements. He has given you a text file (pwd.txt) and asked you to write a program that will scan the file and create two new files (invalidpwd.txt and validpwd.txt). All invalid passwords from pwd.txt will be written to invalidpwd.txt and all valid passwords from pwd.txt will be written to validpwd.txt. Download the Pwd.txt file and save it to the directory where you have your Java project. Write a program that:
• Checks to see if the pwd.txt file exists in the current directory. If the file does not exist in the current directory, display an error message and stop the program.
• Opens the pwd.txt file.
• Creates the files invalidpwd.txt and validpwd.txt and opens them for writing.
• Evaluates each password in the list one at a time to see if each one meets all requirements.
• Writes all valid passwords to the validpwd.txt file and all invalid passwords to the invalidpwd.txt file with the reason the entry is not valid.
• Displays messages to the user as shown in the example run.
Break down the work of determining if a password is valid by writing four methods to check for each requirement. Your program should contain the following four methods:
• hasUpper(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) upper case character and returns false if it does not.
• hasLower(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) lower case character and returns false if it does not.
• hasNumber(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) number and returns false if it does not.
• hasSpecial(): Accepts a text variable as an argument and returns true if the text variable has as least one (1) of the designated special characters and returns false if it does not.
Special Character List: ['@','#','%','-','&','*']
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 6 steps with 4 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education