English subtitles

← Find the Coordinates of the Endpoint - Intro to Java Programming

Get Embed Code
7 Languages

Showing Revision 4 created 05/25/2016 by Udacity Robot.

  1. So now imagine that you've added instance variables for x and y. You'll know
  2. where to draw the circle when you're adding a friend. And that circle marks one
  3. endpoint under the line. But what about the other endpoint? How are you
  4. going to get that? Use the instance variables x and y. Use the friend
  5. parameter. Use xCoord and yCoord. Get the x and y values from the friend
  6. parameter. Or add parameters to the addFriend method to take in the second
  7. endpoint of the line.