Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java program that generates a password for each employee in a company using their name, surname and a special number entered by the
Write a Java program that generates a password for each employee in a company using their name, surname and a special number entered by the user. Assuming a name has n characters and a surname has s characters, the password of each employee will be generated using the below rule: Password = First(n/2)CharactersOfName+ First(s/2)CharactersOfSurname +SpecialNumber+ (LastDigitOfSpeciatNumber^2): Traverse the employee list using a for-loop. For each employee: Name and surname will be entered as String. Special number will be entered as integer and its length cannot be larger than 6. You can use a while-loop for controlling this part. The strength information of the generated password will be kept in a corresponding variable (e.g. weak, medium, strong). A password within length range: [12] is considered to be strong. The number of passwords belong to each corresponding strength and the shortest (weakest)/longest (strongest) passwords should be printed at the end (see sample outputs). Enter the number of employees: Enter your name and surname: Enter your special number: The generated password for su as is: sa224 Weak password Password generator info dialog: # of weak passwords: 1 # of medium passwords: 0 # of strong passwords: 0 The weakest password is: sa224 The strongest password is: sa224
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started