Listing newbill new listingwilliam 99th street 123

This preview shows page 85 - 86 out of 86 pages.

Listing newBill = new Listing((“William”, “99th Street”, “123 4567”); 7. // inserts 8. dataBase. put ("Bill",bill); 9. dataBase. put ("Tom",tom); 10. // fetches 11. b = dataBase. get ("Bill"); t = dataBase. get ("Tom"); 12. System.out.println(b, + “ \ n” t); 13. // effectively an update of Bill's address 14. dataBase. put ("Bill", newBill); b = dataBase. get ("Bill"); // fetches 15. System.out.println(b); 16. // demonstration of the lack of encapsulation. Client can change node contents 17. newBill.setAddress(“18 Park Avenue”); 18. b = dataBase. get ("”Bill”); 19. System.out.println(b); 20. // delete operation 21. dataBase. remove ("Bill"); b = dataBase. get ("Bill"); 22. System.out.println(b) 23. } Use of the HashTable Class
Image of page 85

Subscribe to view the full document.

86 Return to, Overview , primary storage area, hashing functions , perfect hashed structures , non-perfect hashed structures, generic conversion, dynamic hashed structures, Java’s Hashtable class The End End Presentation
Image of page 86
You've reached the end of this preview.
  • Spring '16
  • hash function, Prime number, Array data structure

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern