|
@@ -1 +1,27 @@
|
1
|
|
-# HoldingObjects
|
|
1
|
+# Holding Objects Lab:
|
|
2
|
+
|
|
3
|
+Fork and clone this repository to complete your lab. Submit each part with a Pull Request for a separate branch.
|
|
4
|
+
|
|
5
|
+## Unit Tests
|
|
6
|
+
|
|
7
|
+You are expected to write unit tests for your code. Be sure to write the tests before implementing the functionality being tested. Tests must be thorough and address all possible paths through each method.
|
|
8
|
+
|
|
9
|
+## Submission
|
|
10
|
+
|
|
11
|
+Your completed lab must be submitted via GitHub. Labs are not complete unless they include UML diagrams of all implemented classes, as well as unit tests for all features.
|
|
12
|
+
|
|
13
|
+## Instructions:
|
|
14
|
+
|
|
15
|
+### Part I:
|
|
16
|
+
|
|
17
|
+Create a PhoneBook class that holds names and phone numbers in sorted order. You can use an associative data type (one which stores items as keys paired with values).
|
|
18
|
+
|
|
19
|
+Your PhoneBook class should have a lookup() method which allows you to look up a person's phone number based on their name. PhoneBook should also have methods to add and remove entries, or to list all names or all entries (names an phone numbers).
|
|
20
|
+
|
|
21
|
+### Part II:
|
|
22
|
+
|
|
23
|
+Add a `reverseLookup()` method to PhoneBook. This method should allow you to look up names by the phone number associated with them.
|
|
24
|
+
|
|
25
|
+### Part III:
|
|
26
|
+
|
|
27
|
+Some people have more than one phone number. Refactor your PhoneBook class to map names to lists of phone numbers. You should modify your add() and remove() methods to handle adding or removing individual numbers, and create a removeRecord method for removing an entire entry from your PhoneBook.
|