don juan s troubles don juan s troubles
play

Don Juans Troubles Don Juans Troubles Hey, Anna, how are you? Don - PowerPoint PPT Presentation

Don Juans Troubles Don Juans Troubles Hey, Anna, how are you? Don Juans Troubles Hey, Anna, how I am are you? Magda!!! Noooo, my Precioussss... Don Juans Diary 1.0 Meet HashMap A variable type that stores values accessed


  1. Don Juan’s Troubles

  2. Don Juan’s Troubles Hey, Anna, how are you?

  3. Don Juan’s Troubles Hey, Anna, how I am are you? Magda!!!

  4. Noooo, my Precioussss...

  5. Don Juan’s Diary 1.0

  6. Meet HashMap ● A variable type that stores values accessed by index (key) ● Keys are single type of object (e.g., String) ● Keys are unique ● Items have no order ● Resizable ● Has some helpful methods Wow! Nice to meet you

  7. HashMap is like magic box

  8. HashMap is like magic box Hey magic box, this is “Teddy”

  9. HashMap is like magic box Ok, I will take care of him.

  10. HashMap is like magic box Hey magic box, this is “Cupcake the Unicorn”

  11. HashMap is like magic box SO cute, I will take care of him.

  12. HashMap is like magic box Hey magic box, I want to play with “Teddy”

  13. HashMap is like magic box Here he comes Hey magic box, I want to play with “Teddy”

  14. Don Juan’s Diary 2.0

  15. Don Juan’s Diary 2.0 Key Value Name of Day of the date date

  16. Don Juan’s Diary 2.0 day name

  17. Don Juan’s Diary 2.0 day name July 18 Magda

  18. Don Juan’s Diary 2.0 day name July 18 Magda July 19 Anna

  19. Don Juan’s Diary 2.0 name: Magda day name July 18 Magda July 19 Anna

  20. Don Juan’s Diary 2.0 day name July 18 Magda July 19 Anna

  21. Don Juan’s Diary 2.0 No date on July 20 name: null day name July 18 Magda July 19 Anna

  22. HashMap Methods get value specified by key map . get (key) map . put (key, value) store pair key:value (insert new or overwrite value for existing key) remove key-value pair, return value map . remove (key) remove the entire content map . clear () return true if this HashMap is empty map . isEmpt y() return true whether this HashMap contains specified key map . containsKey (key) return true whether this HashMap contains specified value map . containsValue (value) return the number of all key-value pairs map . size ()

  23. Add a date day day name name July 18 July 18 Magda Magda July 19 Anna

  24. Cancel a date day name July 18 Magda

  25. Any date at all?

  26. Am I busy tomorrow?

  27. Do I date ___?

  28. Change a date day name July 18 Magda

  29. Change a date day name July 18 Magda July 19 Anna

  30. Change a date day name July 18 Jana July 19 Anna

  31. Change a date Keys are unique! day name July 18 Jana July 19 Anna

  32. You shall not date twice a day!

  33. ! ! ! ! ! ! !

  34. Nested collections

  35. Don Juan’s Diary 3.0 dates day names

  36. Don Juan’s Diary 3.0 dates day names

  37. Don Juan’s Diary 3.0 dates day names day : July 18 name : Magda names: null

  38. Don Juan’s Diary 3.0 dates day names day : July 18 name : Magda names: null

  39. Don Juan’s Diary 3.0 dates day names day : July 18 name : Magda names

  40. Don Juan’s Diary 3.0 dates day names July 18 day : July 18 name : Magda names

  41. Don Juan’s Diary 3.0 dates day names July 18 Magda day : July 18 name : Magda names 0 Magda

  42. Don Juan’s Diary 3.0 dates day names July 18 Magda

  43. Don Juan’s Diary 3.0 dates day names July 18 Magda day : July 19 name : Anna names: null

  44. Don Juan’s Diary 3.0 dates day names July 18 Magda day : July 19 name : Anna names: null

  45. Don Juan’s Diary 3.0 dates day names July 18 Magda day : July 19 name : Anna names

  46. Don Juan’s Diary 3.0 dates day names July 18 Magda July 19 day : July 19 name : Anna names

  47. Don Juan’s Diary 3.0 dates day names July 18 Magda July 19 Anna day : July 19 name : Anna names 0 Anna

  48. Don Juan’s Diary 3.0 dates day names July 18 Magda July 19 Anna

  49. Don Juan’s Diary 3.0 dates day names July 18 Magda July 19 Anna day : July 18 name : Jana names 0 Magda

  50. Don Juan’s Diary 3.0 dates day names July 18 Magda July 19 Anna day : July 18 name : Jana names 0 Magda

  51. Don Juan’s Diary 3.0 dates day names July 18 Magda, Jana July 19 Anna day : July 18 name : Jana names 0 Magda 1 Jana

  52. Don Juan’s Diary 3.0 dates day names July 18 Magda, Jana July 19 Anna thuNames 0 Magda 1 Jana

  53. Don Juan’s Diary 3.0 dates day names July 18 Magda, Jana July 19 Anna thuNames 0 Magda 1 Jana [Magda, Jana]

  54. FINAL PROJECTS Almost there guys! You got this!

Recommend


More recommend