|
What is the location of pointB after the following: pointB.move( 24-12, 34*3 - 45 ); A good answer might be:pointB will now be located at x = 12, y = 57. |
Step-by-Step Method CallYou probably did the right thing to get the answer, but let us go through it again just to be sure: At this point, the move method starts running with the two int values it requires.pointB.move( 24-12, 34*3 - 45 ); is equivalent to: pointB.move( 12, 34*3 - 45 ); is equivalent to: pointB.move( 12, 102 - 45 ); is equivalent to: pointB.move( 12, 57 ); The important thing to notice in the above is that the expressions in the parameter list are evaluated before the method starts running. The resulting values should be the data type expected by the method, or a data type that can be converted to that type. |
QUESTION 4:What do you suspect will happen with the following method call? Click Here after you have answered the questionpointB.move( 14.305, 34.9-12.6 ); |