readMaster readTrans return noMasterForTrans output No master file record

Readmaster readtrans return nomasterfortrans output

This preview shows page 35 - 40 out of 360 pages.

readMaster() readTrans() return noMasterForTrans() output "No master file record matches transaction ", transID // should display transID readTrans() return noTransForMaster() output masterID, masterName, masterCredits to newMaster readMaster() // should call readMaster() return allDone() close master close trans close newMaster
return Game Zone start Declarations InputFile eastFile InputFile westFile InputFile midWestFile OutputFile mergedFile string eastLast string eastFirst num eastGames string midLast string midFirst num midGames string westLast string westFirst num westGames string allAtEnd = “N” num END_NAME = “ZZZZZ” getReady() while allAtEnd not equal to “Y” mergeRecords() endwhile finishUp() stop getReady() open eastFile “RockPaperScissorsEast.txt” open midWestFile “RockPaperScissorsMidWest.txt” open westFile “RockPaperScissorsWest.txt” open mergedFile “RockPaperScissorsTop60.txt” readEast() readWest() 2. Your downloadable files for Chapter 7 include a file named DEBUG07-04.jpg that contains Answer : 1. The International Rock Paper Scissors Society holds regional and national championships. E
readMidWest() checkEnd() return readEast() input eastLast, eastFirst, eastGames from eastFile if eof then eastLast = END_NAME endif return readWest() input westLast, westFirst, westGames from westFile if eof then westLast = END_NAME endif return readMid() input midLast, midFirst, midGames from midFile if eof then midLast = END_NAME endif return checkEnd() if eastLast = END_NAME then if midLast = END_NAME then if westLast = END_NAME then allAtEnd = “Y” endif endif endif return mergeRecords() if eastLast < midLast then if eastLast < westLast then output eastLast, eastFirst, eastGames to mergedFile readEast() else output westLast, westFirst, westGames to mergedFile readWest() endif else if midLast < westLast then output midLast, midFirst, midGames to mergedFile readMid() else output westLast, westFirst, westGames to mergedFile
readWest() endif endif checkEnd() return finishUp() close eastFile close midFile close westFile close mergedFile return 2.In the Game Zone section of Chapter 5, you designed a guessing game in which the applicat
output “Please enter your name:” input playerName startGame() return startGame() output PROMPT, LIMIT input guess count = 1 gameCount = gameCount + 1 return playGame() while guess not equal to myRandomNumber if guess > myRandomNumber then output HIGH else output LOW endif input guess count = count + 1 endwhile output CORRECT output “It took ”, count, “ guesses!”

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture