APS101, Winter 2009: Assignment 2 Testing the Passport class methods constructor (at least 1 case) * any input values of the appropriate type addVisited (at least 3 cases) * when countriesVisited is empty ("") * when there is at least one entry, and the new country is NOT equal to the last visited country * when there is at least one entry, but the new country is equal to the last visited country (need to merge the new entry with the last entry) clear (at least 1 case) * when countriesVisited isn't empty (although you should also test clear when countriesVisited is "") firstCountryVisited (at least 2 cases) * when countriesVisited is empty ("") * when there is at least one entry getCountriesVisited (at least 1 case) * any situation getName (at least 1 case) * any situation getSerialNumber (at least 1 case) * any situation lastCountryVisited (at least 2 cases) * when countriesVisited is empty ("") * when there is at least one entry longestVisitedCountry (at least 3 cases) * when countriesVisited is empty ("") * when there is at least one entry, and there is only one entry with the greatest duration * when there is at least one entry, and there is a tie for the greatest duration between at least two entries (method has to return the country from the rightmost entry). numEntries (at least 3 cases) * when countriesVisited is empty ("") -> returns 0 * when there is at least one entry * when there are multiple visits to the same country (although you could also make sure that whenever method addVisited merges two consecutive entries, numEntries counts the new entry as ONE, not two.) numVisits (at least 3 cases) * when countriesVisited is empty ("") -> returns 0 * when there is at least one entry, but the specified country is not found -> returns 0 * when there is at least one entry, and the specified country is found at least once (although you could break that down further: 1) specified country found once 2) specified country found more than once) toString (at least 2 cases) * when countriesVisited is empty ("") -> should say "none" * when there is at least one entry totalDuration (at least 3 cases) * when countriesVisited is empty ("") -> returns 0 * when there is at least one entry, but the specified country is not found -> returns 0 * when there is at least one entry, and the specified country is found at least once (although you could break that down further: 1) specified country found once 2) specified country found more than once) whichCountryVisited (at least 3 cases) * when countriesVisited is empty ("") -> returns "Invalid index!" * when there is at least one entry, but the user specifies an invalid index (could break this into 2 cases: index < 1 and index > number of entries) * when there is at least one entry, and the user specifies a valid index