Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Write the first four terms of the sequence {a}=1- n n=1.

Answered: 1 week ago

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago