B.Tech. (I) - ICP-132 (2008) Assignment 9 Level 0 ------- 9.0.1. Class P has three private members (x, y, z) which are all integers. Write a program that implements the function Opt that will make y=-(x+z) to a constant object of class P. 9.0.2. Set the values of the three coordinates of object of class P using another class as origin. 9.0.3. Using a class P2, extract the values of (x and y) from an object of class P. Level 1 ------- 9.1.1. L1 and L2 are lists of integers with same size. Overload the operator '+' so that list L3=L1+L2 results in a list that is made by adding corresponding elements of the two lists. Eg: Input: L1: 1, 5 L2: 2, 6, 8 Output: L3: 1, 5, 2, 6, 8 9.1.2. Let M1 and M2 be two maps. Overload the operator '+' so that map M3=M1+M2 results in addition of both maps resulting in a map with all the pairs in M1 and M2. You may assume no common keys between M1 and M2. Eg: Input: M1: <"k1", 10>, <"k2", 20> M2: <"k3", 30>, <"k4", 60>, <"k5", 70> Output: M3: <"k1", 10>, <"k2", 20>, <"k3", 30>, <"k4", 60>, <"k5", 70> 9.1.3. Let M1 and M2 be two maps. Overload the operator '+' so that map M3=M1+M2 results in addition of both maps resulting in a map with all the pairs with common keys having values added. Eg: Input: M1: <"k1", 10>, <"k2", 20> M2: <"k1", 30>, <"k4", 60>, <"k5", 70> Output: M3: <"k1", 40>, <"k2", 20>, <"k4", 60>, <"k5", 70> Level 2 ------- 9.2.1. Create a class Matrix which stores a 2-d integers of a matrix with a dimension nxm. Overload operator '+' to add two matrices, each of which is an object of class Matrix. 9.2.2. Overload operator '+' to add a list and a vector to result in a list on the lines given in 9.1.1. 9.2.3. Create a class Matrix which stores a 2-d integers of a matrix with a dimension nxm. Overload operator '*' to multiply two matrices, each of which is an object of class Matrix.