Monday
March 27, 2017

Post a New Question

Posted by on .

trying to debug pseudocode


2. Th e Springwater Township School District has two high
schools—Jeff erson and Audubon. Each school maintains a
student fi le with fi elds containing student ID, last name, fi rst
name, and address. Each fi le is in student ID number order.
Design the logic for a program that merges the two fi les
into one fi le containing a list of all students in the district,
maintaining student ID number order.





start

Declarations
InputFile customerData
OutputFile mailingLabels
string studentid
string firstName
string LastName
string streetAddress


housekeeping( )
while bothDone = "N"
mainLoop( )
endwhile
finishUp( )
stop






housekeeping( )
open customerData "VernonHillsMailOrderBoxes.txt"
open mailingLabels "CutomerMailingLabels.txt"
Jefferson( )
Audubon( )
if jeffId = 9999 then
if audId = 9999 then
bothDone = "Y"
endif
endif
return






Jefferson( )
if eof then
jeffId = 9999
endif
return





Audubon( )
if eof then
audId = 9999
endif
return






mainLoop( )
if jeffId > audId then
Audubon( )
else
Jefferson( )
endif
if jeffId = 9999 then
if audId = 9999 then
bothDone = "Y"
endif
endif
return





finishUp( )
close files
return

  • programming - ,

    Well, beside the fact that the there's no indication of reading or writing anywhere...

    The program's goal is to sort-merge two files into one, yet the program opens only one input file (and one output file). The program cannot accomplish the goal; it will not do what it's supposed to do.

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question