/ Cooper College maintains a master file of students and credits earned

// Each semester the master is updated with a transaction file
// that contains credits earned during the semester
// Each file is sorted in Student ID number order

start
Declarations
num masterID
string masterName
num masterCredits
num transID
num transCredits

string bothDone = "N"
num HIGH_VALUE = 999999
InputFile master
InputFile trans
OutputFile newMaster
getReady()
while bothDone = "N"
detailLoop()
endwhile
allDone()
stop

getReady()
open master "studentFile.dat"
open trans "semesterCredits.dat"
open newMaster "updatedStudentFile.dat"
readMaster()
checkBoth()
return

readMaster()
input masterID, masterName, masterCredits from master
if not eof then
masterID = HIGH_VALUE
endif
return

readTrans()
input transID, transCredits from trans
if not eof then
transID = HIGH_VALUE
endif
return

checkBoth()
if masterID = HIGH_VALUE AND transID = HIGH_VALUE then
bothDone = "N"
endif
return

detailLoop()
if masterID = transID then
match()
else
if masterID > transID then
noMasterForTrans()
else
noTransForMaster()
endif
endif
checkBoth()
return

match()
masterCredits = masterCredits + transCredits
output masterID, masterName, masterCredits to newMaster
readMaster()
readTrans()
return

noMasterForTrans()
output "No master file record maches transaction ", transID
readTrans()
return

noTransForMaster()
output masterID, masterName, masterCredits to newMaster
readMaster()
return

allDone()
close master
close trans
close newMaster
return

The technical management team is ready to review your proposed design for BeT. The Banking e-Teller system allows bank customers to perform ATM transactions from their cell phone. This first generation system will allow customers to check balances, make remote capture deposits, and perform balance transfers to their checking or savings account.

Gather your deliverables from the previous assignments:

Problem analysis chart
Structure chart
IPO chart
Coupling diagram
Data dictionary
Flowcharts for all modules in the structure chart
Algorithm(s) in pseudocode describing the steps the program will perform

flowchartonfatgramcalories

The given code is written in a pseudo code format and appears to be a program that updates a master file of student information with semester credits earned. Here is a step-by-step breakdown of the code:

1. Declare variables: Declare variables for storing student and credit information, including masterID (student ID number), masterName (student name), masterCredits (total credits earned), transID (transaction ID number), and transCredits (semester credits earned).

2. Initialize variables: Initialize the variable "bothDone" to "N" (indicating that both the master and transaction files have not been fully processed) and set HIGH_VALUE to 999999 (a high number to represent the end of the file).

3. Open input and output files: Open the "studentFile.dat" as the master file, "semesterCredits.dat" as the transaction file, and "updatedStudentFile.dat" as the new master file.

4. Call the "getReady()" function: This function prepares for processing the master and transaction files.

5. Start a loop until both files are fully processed: While the variable "bothDone" is "N", continue executing the detailLoop() function.

6. Call the "detailLoop()" function: This function iterates through the master and transaction files, either matching student IDs or handling cases where a student or transaction record is missing.

7. Call the "allDone()" function: This function closes all open files and marks the end of the program.

The functions within the code perform the following actions:

- getReady(): Opens the input and output files, reads the first record from the master file, and checks if both files are fully processed.
- readMaster(): Reads a record from the master file, setting the masterID to HIGH_VALUE if the end of the file is reached.
- readTrans(): Reads a record from the transaction file, setting the transID to HIGH_VALUE if the end of the file is reached.
- checkBoth(): Checks if both the master and transaction files are fully processed by comparing the masterID and transID.
- detailLoop(): Compares the masterID and transID to determine the next logical step in the program flow (match, noMasterForTrans, or noTransForMaster).
- match(): Adds the transCredits to the masterCredits, outputs the updated student information to the new master file, and reads the next records from both the master and transaction files.
- noMasterForTrans(): Outputs a message indicating that there is no corresponding master file record for the transaction record, and reads the next record from the transaction file.
- noTransForMaster(): Outputs the student information from the master file to the new master file, and reads the next record from the master file.
- allDone(): Closes all open files.

Please note that this breakdown is based on the provided code and assumptions made based on the structure and logic of the program.

This program describes a process for updating a master file of students and the credits they have earned each semester using a transaction file. The program maintains a master file that contains information such as the student's ID number, name, and credits earned. Each semester, a transaction file is provided that contains the credits earned by students during that semester.

Here is a step-by-step explanation of how the program works:

1. The program starts by declaring variables to store the relevant data, such as student ID, name, and credits earned.

2. It also declares a variable "bothDone" initialized with the value "N" to keep track of whether both the master and transaction files have been fully processed.

3. Two input files, "master" and "trans," are opened, along with an output file "newMaster" where the updated information will be stored.

4. The "getReady()" function is called to set up the necessary files and variables.

5. Inside a while loop, the program enters the "detailLoop()" function, which processes the records in the master and transaction files.

6. The "detailLoop()" function checks whether the current master and transaction records match based on their ID numbers. If they do, the function calls the "match()" function to update the master record with the credits earned from the transaction record.

7. If the ID numbers don't match, the program determines whether the master record is missing for the transaction record or vice versa. The appropriate function, "noMasterForTrans()" or "noTransForMaster()", is called to output an error message or update the master file, respectively.

8. After each iteration of the loop, the "checkBoth()" function is called to determine if both the master and transaction files have been fully processed. If both IDs are set to the maximum value (HIGH_VALUE), it means that both files have reached the end.

9. Once the loop finishes, the program calls the "allDone()" function to close the files and complete the process.

Overall, this program ensures that the master file is updated with the credits earned by students during each semester based on the transaction file. It handles cases where records may be missing or don't match in either file.