In today's lab we will modify a non-generic map datatype implementation to its generic version. In previous labs we typically used one type parameter <T> for generic Java classes. The generic classes we will see in today's lab use two type paramters written as <K, V>. The purpose of defining such type pairs will become clear below. HashClient.java provides an example to create a Scanner object from a file in your directory. We use this Scanner object to read the homework 5 string list into memory. TASKS:
|
|
|
WordList.java HashClient.java |
http://cs-people.bu.edu/tvashwin/cs112_spring09/lab09.html |