Programming and Problem Solving with Java

(やまだぃちぅ) #1

CASE STUDY^565


Put secondEntry in resultList
resultList.insert(secondEntry)
ifsecondCount equals secondLimit
Set moreData2 to false
else
Set secondEntry to next item in secondList
secondCount++

Put firstEntry in resultList
resultList.insert(firstEntry)
iffirstCount equals firstLimit
Set moreData1 to false
else
Set firstEntry to next item in firstList
firstCount++

firstEntry comes before secondEntry
compareResult =
firstEntry.knowName().compareTo(secondEntry.knowName())

Set up for processing secondList
Reset secondList
Set secondEntry to next entry in secondList
Set secondCount to 1
Set secondLimit to length of secondList
Set moreData2 to secondCount <= secondLimit

Set up for processing firstList
Reset firstList
Set firstEntry to next entry in firstList
Set firstCount to 1
Set firstLimit to length of firstList
Set moreData1 to firstCount <= firstLimit
Free download pdf