Question
// Pseudocode PLD Chapter 7 #6a pg. 301 // Start // Declarations // InputFile masterFile; // InputFile transactionFile; // OutputFile newMasterFile; // num mClientNumber, mtotalClientCost,
// Pseudocode PLD Chapter 7 #6a pg. 301 // Start // Declarations // InputFile masterFile; // InputFile transactionFile; // OutputFile newMasterFile; // num mClientNumber, mtotalClientCost, tClientNumber, titemClientCost // string mClientfName, mClientlName // output "Master File Updating Starting" // open masterFile "Master.rtf" // open transactionFile "Transaction.rtf" // open newMasterFile "newMaster.rtf" // read mClientNumber, mClientfName, mClientlName, mtotalClientCost from masterFile // read tClientNumber, titemClientCost from transactionFile // while ( transactionFile not EOF ) // while (( masterFile not EOF) and (mClientNumber < tClientNumber)) // output mClientNumber, mClientfName, mClientlName, mtotalClientCost to newMasterFile // read mClientNumber, mClientfName, mClientlName, mtotalClientCost from masterFile // endwhile // if (masterFile is EOF) // output "Error Client ID: ", tClientNumber, " not in Master File." // else if (mClientNumber == tClientNumber) then // mtotalClientCost = mtotalClientCost + titemClientCost // output mClientNumber, mClientfName, mClientlName, mtotalClientCost to newMasterFile // read mClientNumber, mClientfName, mClientlName, mtotalClientCost from masterFile // else if (mClientNumber > tClientNumber) then // output "Error Client ID: ", tClientNumber, " not in Master File." // endif // read tClientNumber, titemClientCost from transactionFile // endwhile // while (masterFile not EOF) // output mClientNumber, mClientfName, mClientlName, mtotalClientCost to newMasterFile // read mClientNumber, mClientfName, mClientlName, mtotalClientCost from masterFile // endwhile // output "Master File Updating Complete" // close masterFile // close transactionFile // close newMasterFile // Stop
I can't get it to run with the following
5 Mike Smith 2098.72 6 Sue Nathan 1234.32 100 Bobby Jones 519.69 125 Sally Mayer 345.74 200 Danny Glover 5623.18
1 568.34 5 345.10 6 1012.43 17 2045.12 100 1231.00 101 167.39 125 5239.67
The ones that are listed aren't working
This is what I have. Can't figure out the mistake
#include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started