Using the function template below, type a working function. …
Using the function template below, type a working function. Make sure your function conforms to the instructions given in the comments for the function. [Note: Include the function header in you answer, you don’t need to copy the comment section in your response] /*_____________ fooSolver(______________________)This method should take as parameters two Maps that contain the contact information of neighbors and must return a new map with the updated info of both maps.Each map stores a name (string) as a key and an email (string) as a value.Emails must not be duplicated in the resulting map. The information in map1 prevails if the same name exists in both maps (most recent), otherwise copy from map2 (oldest emails) the customer’s email that is missing.For example, if the Map1 (recent emails) contains:{{“John Adams”, “adams@postoffice.usa”}, {“Ben Franklin”, “ben@postoffice.usa”}}and Map2 (older emails ) contains:{{“Thomas Jefferson”, “box2@postoffice.usa”}, {“John Adams”, “box3@postoffice.usa”}, {“Ben Franklin”, ” box1@postoffice.usa”}} would cause the method to return the map:{{“John Adams”, “adams@postoffice.usa”}, {“Ben Franklin”, “ben@postoffice.usa”}, {“Thomas Jefferson”, “box2@postoffice.usa”}}Assume that names are correctly spelled, capitalized and emails are correctly entered without missing characters.The original Maps must NOT be changed by this method. */________________ fooSolver ( ______________________________________){}
Read DetailsThe following code segment will be used for the next 5 quest…
The following code segment will be used for the next 5 questions . The code in the class Bar is complete, and main () contains only a partially completed main method (in other words there are no additional functions in the class Bar, but there could be more code in the main method) . NOTE: be aware that some of these questions may have more than one correct answer listed – you should mark ALL that apply in these cases: class Bar : public Foo { private: int integer1; list list1; public: Bar() { integer1 = -1; } void enigma(int x) { list1.push_back(x); integer1 = integer1 + 1; } int mystery() { integer1=integer1-1; int val = list1.front(); list1.pop_front(); return val; } bool riddle() { return (integer1
Read DetailsModify the Matrix class provided below and give the definiti…
Modify the Matrix class provided below and give the definition of a template Matrix class, so that the template Matrix class has the same functions as the above definition for integers, but can be used to store elements of any given data type. You do not need to implement any member function. Analyze which lines you need to modify: enter the line number to modify as well as the letter option for the new line of code, from the options given below, to modify the class and make it a template. Enter only the lines that must be modified and the new code. Go in order. If there are left some Lines unused, enter empty as shown. Example of modifying a line: Line: 4 code: B Example of unused lines: Line: none code: N: empty (No code) Enter your answers: Line: [line1] code:[code1] Line: [line1a] code:[code1a] Line: [line2] code:[code2] Line: [line3] code:[code3] Line: [line4] code:[code4] Line: [line5] code:[code5]
Read Details