Plab 2002/2003 - Example for questions for the final exam. Code segment A: ---------------- Class Point { private: double m_x; double m_y; public: Point(double x, double y): m_x(x), m_y(y) { } Point& operator*(Point const& p1, Point const& p2) { p1.m_x *= p2.m_x; p1.m_y *= p2.m_y; return p1; } void setX( double x) const { m_x = ix; } double getX() const { return m_x; } void print() { cout << m_x << "," << m_y << endl; } }; (End of code segment A) The following questions (a-c) relate to code segment A: a. Complete ALL the correct statements, if any: 1. The function setX will cause compilation errors because: 2. The function getX will cause compilation errors because: b. Consider the following code: Point p1(3.0,2,0); Point p2(4.0,5.0); Point p3(2.0,3.0); p1=(p3*p2)*p1; p1.print(); Complete the correct statement: 1. The operator* method compiles well, and the output of the lines above is : _______________ 2. The operator* method doesn't compile, because ___________________ c. re-write the class Point as a template class (without the getX and setX methods). Instead of doubles, it should be able to hold any class (x and y are of the same class).