Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 boxStep 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