Q.5.2 The Accounts S.A. group keeps a client file for each accountant in the off
ID: 3753808 • Letter: Q
Question
Q.5.2 The Accounts S.A. group keeps a client file for each accountant in the office. Each record contains the clients first and last name, home address and birth year. The records are sorted in ascending birth year order. Two (2) accountants, Mr. Bhayi and Mr. Smith, have formed a partnership Design the logic that produces a merged list of their clients in ascending order by birth year. The pseudocode for the mainline logic is given below start Declarations InputFile bhayiFile InputFile smithFile OutputFile mergedFile num bhayiBirthYr string bhayiFirst string bhayiLast string bhayiAddress num smithBirthYr string smithFirst string smithLast string smithAddress string areBothAtEnd- "N" num END YEAR0 getReady ) while areBothAtEnd Y" mergeRecords ( endwhile finishUp () stopExplanation / Answer
Pseudocode for checkEnd() module:
checkEnd()
start
// test if both files have ended then change areBothAtEnd to "Y"
if (bhayiFile has reached end) and (smithFile has reached end)
areBothAtEnd = "Y"
stop
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.