in c++. Paste working code using the outline above please. 2 #include 3 #include 45 using namespace std;6.7 // TODO: Write method to create and output all permutations of the list of names.8 void...


in c++. Paste working code using the outline above please.


Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one<br>word names (until -1), and use a recursive method to create and output all possible orderings of those names, one ordering per line.<br>When the input is:<br>Julia Lucas Mia -1<br>then the output is (must match the below ordering):<br>Julia Lucas Mia<br>Julia Mia Lucas<br>Lucas Julia Mia<br>Lucas Mia Julia<br>Mia Julia Lucas<br>Mia Lucas Julia<br>288892.1074736.qx3zqy7<br>LAB<br>6.10.1: LAB: All permutations of names<br>0/ 10<br>АCTIVITY<br>main.cpp<br>Load default template..<br>1 #include <vector><br>2 #include <string><br>3 #include <iostream><br>4<br>5 using namespace std;<br>6.<br>7 // TODO: Write method to create and output all permutations of the list of names.<br>8 void AllPermutations(const vector<string> &permlist, const vector<string> &namelist) {<br>9<br>10 }<br>11<br>12 int main(int argc, char* argv[]) (<br>vector<string> namelist;<br>vector<string> permlist;<br>string name;<br>13<br>14<br>15<br>16<br>17<br>// TODO: Read in a list of names; stop when -1 is read. Then call recursive method.<br>18<br>19<br>return 0;<br>20 }<br>21<br>

Extracted text: Write a program that lists all ways people can line up for a photo (all 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, one ordering per line. When the input is: Julia Lucas Mia -1 then the output is (must match the below ordering): Julia Lucas Mia Julia Mia Lucas Lucas Julia Mia Lucas Mia Julia Mia Julia Lucas Mia Lucas Julia 288892.1074736.qx3zqy7 LAB 6.10.1: LAB: All permutations of names 0/ 10 АCTIVITY main.cpp Load default template.. 1 #include 2 #include 3 #include 4 5 using namespace std; 6. 7 // TODO: Write method to create and output all permutations of the list of names. 8 void AllPermutations(const vector &permlist, const vector &namelist) { 9 10 } 11 12 int main(int argc, char* argv[]) ( vector namelist; vector permlist; string name; 13 14 15 16 17 // TODO: Read in a list of names; stop when -1 is read. Then call recursive method. 18 19 return 0; 20 } 21
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here