English subtitles

← Talk To - Intro to Java Programming

Get Embed Code
5 Languages

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

  1. What if I want to rearrange my friends list, based on who I talked to last.
  2. I'll add a method, talkTo, which takes a friend, which, wherever they are on
  3. the list, will take them, and move them up to the front of the list. There's
  4. one odd situation we would need to think about. What should happen if the given
  5. person isn't a friend? To decide this, we would need to think about this
  6. situation we're modeling. Do you add every person you talk to, as a friend?
  7. That would be pretty cool. We'd all have a lot of friends, but I think that's
  8. not realistic. So in this case, let's say if you talked to somebody who isn't a
  9. friend at all yet, nothing changes. How would you implement the talkTo method?