abstract data types advancebydays )advances the date by the given number of days the date is incremented if days is positive and decremented if days is negative the date is capped to november bcif necessary comparable otherdate )compares this date to the otherdate to determine their logical ordering this comparison can be done using any of the logical operators >===!tostring ()returns string representing the gregorian date in the format mm/dd/yyyy implemented as the python operator that is automatically called via the str(constructor the abstract data types defined in the text will be implemented as python classes when defining an adtwe specify the adt operations as method prototypes the class constructorwhich is used to create an instance of the adtis indicated by the name of the class used in the implementation python allows classes to define or overload various operators that can be used more naturally in program without having to call method by name we define all adt operations as named methodsbut implement some of them as operators when appropriate instead of using the named method the adt operations that will be implemented as python operators are indicated in italicized text and brief comment is provided in the adt definition indicating the corresponding operator this approach allows us to focus on the general adt specification that can be easily translated to other languages if the need arises but also allows us to take advantage of python' simple syntax in various sample programs using the adt to illustrate the use of the date adtconsider the program in listing which processes collection of birth dates the dates are extracted from standard input and examined those dates that indicate the individual is at least years of age based on target date are printed to standard output the user is continuously prompted to enter birth date until zero is entered for the month this simple example illustrates an advantage of working with an abstraction by focusing on what functionality the adt provides instead of how that functionality is implemented by hiding the implementation detailswe can use an adt independent of its implementation in factthe choice of implementation for the date adt will have no effect on the instructions in our example program note class definitions classes are the foundation of object-oriented programing languages and they provide convenient mechanism for defining and implementing abstract data types review of python classes is provided in appendix