¥To
process entries in a city directory, we need two methods:
¥
/** Returns the name
of this CityEntry */
¥ String getName();
¥
¥ /** Returns all information in this
CityEntry */
¥ String toString()
¥
¥The toString() method is already declared in Object (the superclass of CityEntry)
but the provided default behavior does
not satisfy the contract given above, so it must
be overridden in each variant.
¥The getName must be declared as abstract
in CityEntry.
¥
¥