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.

• Describe each class in English.

• Draw the class diagram.

• Describe each association in English (both directions).

• Draw the relation scheme.

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.