External Interfaces/API |
Running the phonebook Program
In this sample run, a user invokes phonebook
with no arguments. The user selects menu action 5
, which displays the two entries currently in the phone book (all entries are fictitious). Then, the user selects 2
, to add an entry. After adding the entry, the user again selects 5
, which displays the new entry along with the other two entries.
Phonebook Menu: 1. Look up a phone number 2. Add an entry to the phone book 3. Remove an entry from the phone book 4. Change the contents of an entry in the phone book 5. Display entire contents of the phone book 6. Exit this program Please type the number for a menu selection: 5 ------------------------- Sylvia Woodland (508) 111-3456 ------------------------- ------------------------- Russell Reddy (617) 999-8765 ------------------------- Phonebook Menu: 1. Look up a phone number 2. Add an entry to the phone book 3. Remove an entry from the phone book 4. Change the contents of an entry in the phone book 5. Display entire contents of the phone book 6. Exit this program Please type the number for a menu selection: 2 Type the name for the new entry, followed by Enter. Then, type the phone number(s), one per line. To complete the entry, type an extra Enter. :: BriteLites Books :: (781) 777-6868 :: BriteLites Books has been added to the phone book. Phonebook Menu: 1. Look up a phone number 2. Add an entry to the phone book 3. Remove an entry from the phone book 4. Change the contents of an entry in the phone book 5. Display entire contents of the phone book 6. Exit this program Please type the number for a menu selection: 5 ------------------------- BriteLites Books (781) 777-6868 ------------------------- ------------------------- Sylvia Woodland (508) 111-3456 ------------------------- ------------------------- Russell Reddy (617) 999-8765 -------------------------
Description of Function pb_keyfilter | Importing and Exporting Data |