For example, suppose we have a new requirement for the library catalog system: we now want to track circulation, keeping records of which patrons have checked out which books. This means we will almost certainly need a class to represent borrowers. We could choose to build a new Borrower class for this purpose; but suppose we then find out that we already have a LibraryPatron class that was implemented for a system that prints library cards. The LibraryPatron class has the following attributes, each with a getter and setter method:
This seems to be everything we need, so now we just need to incorporate the LibraryPatron class into our Library Catalog model. To do so, follow these steps:
The new Borrower class figure should now be automatically
populated with the attributes and methods from the existing
LibraryPatron class. Since the name of the class design is
different from that of the underlying class, the label of the class figure
gives both names.