Once the class is written, there may be some additional methods required before
Danish can be run. First of all, there must be a method which will test two
objects for equality and return a boolean for each object that must be tested
by the axia. For instance, the
"=="
operator can test ints, floats, booleans, and other standard data types, and
the "equals()
" method can compare strings, but the user will
probably have to write a method in the class to compare two instances of the
ADT if one doesn't already exist. The user must be sure to compare enough
aspects of the data type to be sure the instances are equal if Danish is
expected to work correctly.
In the extraordinarily unlikely event of a bug, the user will also have to
provide methods that will print out any data type that had to be tested in the
previous paragraph. System.out.print()
will handle most data
types, but again, the user will probably have to provide one for the data type
being tested. As long as such a method exists, Danish will be happy, so it is
up to the user to decide how much information to put into the printing method.
Of course, the more information is displayed, the easier debugging will become.