Exercise: book authors
Refer back to the library book exercise in the preceeding section if necessary. Remember that we couldn’t include authors in the CatalogEntry class because there might be more than one author for each book.
In a real (old-fashioned) library catalog, there was an additional card for each author of a book. (Author and title cards were contained in different sets of card drawers.)
Design a class diagram that shows the catalog entry plus authors, the attributes of each class, and the association between the classes.
Your first version of this model might not have included a way to identify which author should be listed first, second, and so on. In real life, authors are very sensitive about this. Revise your model if necessary to accommodate this requirement.
The solution to this exercise will be discussed in class or online at a later date.
Copyright © 2002–2006, by Tom Jewett. Links to this site are welcome and encouraged. Individual copies may be printed for non-commercial classroom or personal use; however, this material may not be reposted to other web sites or newsgroups, or included in any printed or electronic publication, whether modified or not, without specific permission from the author.