Menu

Introduction Use Java Collection Objects Generate Random Names Useful Production Data Cust Q43891035

Introduction

This will use Java Collection objects to generate random names.This is useful when you have production data with customer names init, but you need valid data in Dev/Test/Stage, but want to avoidhaving Personally Identifiable Information (PII) in these lowerlife cycles. You can use these random names to replace the PII datawhile copying the data from Production to these lower life cycles.(You also want to change addresses, birthdates, phone numbers,email, etc. but for this assignment we will focus on names).Students will then find all names that share common first names anddisplay them.

Description

The program will need to perform the following tasks:

• Display your name and email address as the first output

• Load a list of First names and Last names from a file (2 fileswill be provided) and load these into a Collection object (again 2different objects is suggested)

• Generate 20 new unique names (meaning noduplicates) by randomly selecting a First Name and a LastName

• Sort this list of names by First Name and display on thescreen

• Sort this list of names by Last Name and display on thescreen

• Now find all instances of the new names that share a commonfirst name (hint: a Map would be a really good object to use forthis)

firstNames.txt

JamesBobaWicketBoskkHanLukeAnakinLeiaReyFinnPoeKylo

lastNames.txt

TuckerFettSoloSkywalkerDameronTrooperRen

Sample Run

Submitted by John Doe – jdoe@sample.com

Generated Names:

1. Rey Ren

2. Kylo Fett

3. Boskk Dameron

4. Finn Solo

5. Anakin Dameron

6. Anakin Fett

7. Boskk Fett

8. Wicket Trooper

9. Anakin Ren

10. Boba Solo

11. Wicket Tucker

12. Wicket Fett

13. Kylo Skywalker

14. Anakin Trooper

15. Luke Skywalker

16. Kylo Dameron

17. Luke Ren

18. Han Solo

19. Boskk Solo

20. Leia Skywalker

Sorted by First Name

Anakin Dameron

Anakin Trooper

Anakin Fett

Anakin Ren

Boba Solo

Boskk Fett

Boskk Solo

Boskk Dameron

Finn Solo

Han Solo

Kylo Skywalker

Kylo Fett

Kylo Dameron

Leia Skywalker

Luke Ren

Luke Skywalker

Rey Ren

Wicket Trooper

Wicket Tucker

Wicket Fett

Sorted by Last Name

Anakin Dameron

Boskk Dameron

Kylo Dameron

Anakin Fett

Boskk Fett

Kylo Fett

Wicket Fett

Anakin Ren

Luke Ren

Rey Ren

Kylo Skywalker

Leia Skywalker

Luke Skywalker

Boba Solo

Boskk Solo

Finn Solo

Han Solo

Anakin Trooper

Wicket Trooper

Wicket Tucker

Combine all names by First Name

Boskk

Dameron

Fett

Solo

Finn

Solo

Kylo

Dameron

Fett

Skywalker

Wicket

Fett

Trooper

Tucker

Boba

Solo

Han

Solo

Leia

Skywalker

Luke

Ren

Skywalker

Rey

Ren

Anakin

Dameron

Fett

Ren

Trooper

Expert Answer


Answer to Introduction This will use Java Collection objects to generate random names. This is useful when you have production dat…

OR