CS3132 Test 2 Name ___________________ B00__________ torch Login Please answer both sides of this page. 0: Write a C++ program which takes standard input such as Susan t1 50 Mark a1 10 Jane a1 20 Jane a2 20 Mark a2 10 Mark a3 18 where each tuple contains a name, assignment and grade and your program stores all the marks for each person in a map and then outputs the marks for each person whose name is supplied as a command-line argument. All the person data should be stored in a map of maps. With the above data a.out Mark John Jane should produce: Mark: a1 10 a2 10 a3 18 John: Jane: a1 20 a2 20 Use appropriate iterators. [10 marks] #include < > #include #include < > using int main(int argc, char**argv){ CS3132 Test 2 Name ___________________ B00__________ torch Login 1: For class X what are the signatures of a the "Big 3" methods?[2] 2: Where are copy constructors used most often in C++?[1] 3: What is a function object?[1] 4: Write c++ code which defines a function object and uses it with an STL algorithm to fill a vector with the numbers 1, 2, ..., n. [4] 5: Suppose we want to find the shortest path in a labeled graph where each edge has a different length. What STL container would be appropriate to store the neighbours of each Node? [1] 6: If the graph edges were all the same length what container(s) would be appropriate?[1] 7: How would you efficiently store the information necessary to print out the shortest path from a start vertex to all verticies in a graph? [1] 8: What use is a priority_queue/heap in Dijkstra's algorithm?[1] 9: When would you use a set instead of a vector?[1]