Address Book Application Code
For the purposes of lab writing, you may use the code I
provide or you may write your own. The following are the files I
supply and a description of each. If you click on the file, it
will appear in the WWW browser you are using. If you then select
File then Save As, you will be given the opportunity to save the
file to your local directory. You can also copy the files from my
home directory, ~simonoff/addressbook/.
- add_bk.h and add_bk.C
- These files contain the interface and implementation for
a C++ class representation of an address book. These
classes provide functions to sort, add, replace, find
addresses. You can also ask for a specific address by
position index in the address book (item 1). Note that
this implementation limits the address book size to 100
entries. The following is the change history:
- Initial Release
- address.h and address.C
- These file encapsulate the concept of an address in a C++
class. The Address class is built from a name, 2 lines of
address, city, state, zip code, and phone number. The
user of this class can also compare 2 addresses. The
following is the change history:
- Initial Release
- c_if.h and c_if.C
- These files implement an C interface to the C++ classes
comprising the address book application code. The
functions contained in these files will allow you to
write you user interface in C, manipulate the address
book in whatever way you need, without having to know
C++. The following is the change history:
- Initial Release
- str_cpp.h and str_cpp.C
- These files are the header and implementation of a C++
string class. The class, as implemented, does not provide
much capability. Users of this class can compare strings,
and extract a char*. Please note that if you use this
class directly, you are responsible for deleting memory
after extracting the char*. The following is the change
history:
- Initial Release
- main.C
- This is a demonstration program which uses the functions
available in c_if.h. The following is the change history:
- Initial Release
Go back to the Lab Writing section
of the Student Information page
Robert Simonoff - simonoff@aplcenmp.apl.jhu.edu
Last Updated on February 11, 1996