Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!