1. Look up the
NSDate class in your documentation. Then add a new category to
ElapsedDays. In that new category, add a method based on the following method declaration:
-(unsigned long) elapsedDays: (NSDate *) theDate;
Have the new method return the number of elapsed days between the receiver and the argument to the method. Write a test program to test your new method.
2. Modify the
lookup: method developed in this chapter for the
AddressBook class so that partial matches of a name can be made. The message expression
[myBook lookup: @"steve"] should match an entry that contains the string
steve anywhere within the name.
3. Using the result from Exercise 2, modify the
lookup: method to search ...