Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Lab 21: Java Collections: Hashtable ► CMSC 132A:   Systematic Program Design II Syllabus Texts Schedule Exams Lectures Labs Assignments Piazza Grades Server Submit Server Acknowledgments ▼ Labs Lab 1: Simple Data Definitions with Class Lab 2: More Data Definitions Lab 3: Classy Snakes Lab 3.5: Classy Snakes (cont.) Lab 4: Same Story, More Syntax Lab 5: More Data Definitions in Java Lab 6: A Simple OO Universe Lab 7: JSON Equality Lab 8: 99 Red Falling Balls Lab 9: Fold! Lab 10: Exam Practice Lab 11: No lab Lab 12: Dispatching Visitors Lab 13: Counting on State Lab 14: Cyclic Lists Lab 15: Mutable Lists Lab 16: Social Graphs Lab 17: Stacks of Stuff Lab 18: Iterating Again & Again & Again ... Lab 19: Fixing Hash tables Lab 20: Resizing Hash tables Lab 21: Java Collections:   Hashtable Lab 22: More Random-Access List Operations ► Lab 21: Java Collections:   Hashtable Intro Recall Read up on Hashtables Wrapping a Hashtable as a Table Evaluation Submission On this page: Intro Recall Read up on Hashtables Wrapping a Hashtable as a Table Evaluation Submission 6.12     ← prev  up  next →  Lab 21: Java Collections: Hashtable Intro You’ll work in this lab with ad-hoc partners. The two of you will work as a team to solve problems. At any time, one of you will be the Head and the other will be the Hands. The Head does the thinking and the Hands does the typing. Hands type only what the Head tells them to, but you’re free to discuss any issues that pop up. You should switch off during the lab to make sure each of you get practice problem solving, dealing with syntax, and getting finger exercises on the keyboard. You should start this lab with this project skeleton. Recall We’ve now seen how to build a real hash table data structure in class. During the last lab, you were asked to evaluate the performance of your hash table and your list implementation of the Table interface. In this lab, you’ll compare your implementation against Java’s own Hashtable class. Read up on Hashtables To start, read the documentation for Java’s Hashtable class. Make some examples and try it out. Wrapping a Hashtable as a Table Implement a "wrapper" class that implements your Table interface. That is: implement a class called WrapHashtable that implements Table. The class should have a single Hashtable field and all of the Table methods should be implemented by using the appropriate Hashtable methods on this field. Be sure to thoroughly test your WrapHashtable class. Evaluation Using the code you wrote in Wednesday’s lab, evaluate the performance of this new table implementation. How does it compare to your own hand-rolled hash table? Submission Submit a zip file of your work at the end of lab.     ← prev  up  next →