Question: Now consider the following code segment, assuming the Point class definition from Warm-up 1, and answer the questions below. int main() {Point.xlocation = 3; Point.ylocation

Now consider the following code segment, assuming the Point class definition from Warm-up 1, and answer the questions below. int main() {Point.xlocation = 3; Point.ylocation = 10; Point p1; p1 = Point(5, 6); Point p2() ; return 0;} a. Describe the problem (if any) with the statements in lines 3 and 4: b. Describe (in detail) what the statement in line 7 does (consult your textbook): c. What is the problem (if any) with the statement in line 9 (assuming you are trying to declare an instance of the point class)? d. What does the statement in line 9 currently declare? e. Rewrite the statement in line 9 to declare a default instance of the Point class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
