Question: I need this answer in java please 6.11LAB: All permutations of names Write a program that lists all ways people can line up for a

I need this answer in java please

I need this answer in java please 6.11LAB: All permutations of namesWrite a program that lists all ways people can line up for

6.11LAB: All permutations of names Write a program that lists all ways people can line up for a photo (al permutations of a list of Strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line. When the input is: Iniia Lucas Mia 1 then the output is (must match the below ordering): Juia, Lucas, Mia Juia, Mia, Lucas Lucas, Julia, Mia Lucas, Mia, Julia Mia, Julia, Lucas Mia, Lucas, Julia 6.11.1: LAB: All permutations of names 0/10 PhotoLineups.java Load default template... I/ TOOO: Write method to create and output all permutations of the list of nomes. public static void printAllPermutations(ArrayList permList, ArrayList nameList) \{ \} public static void main(String args) \{ Scanner scnr = new Scanner (System. in); Arraylist nameList = new ArrayList O Arraylist O; String name; 1/ TODO: Read in a list of names; stop when -1 is read. Then call recursive method. \} \} Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the programs output in the second box

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!