8.5. Abstract Data Types

The abstract data types are contained in the com.samscdrental.model.adt package:

    CustomerID.java
    PhysicalID.java
    Timestamp.java
    UPCCode.java
    Dollar.java
    Name.java

The ADTs have no dependencies to the model. They are reusable in a number of different programs. They represent common data types: CustomerID, PhysicalID, Timestamp, UPCCode, Dollar, and Name.

Each ADT has methods for converting to and from strings. Two ADTs have corresponding display classes, since they appear in GUI dialogs. These two are CustomerIDTextField and PhysicalIDTextField. If the other ADTs appear in future dialogs, equivalent widgets will be created.

Get Prefactoring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.