Question

The International Rock Paper Scissors Society holds regional and national championships. Each region holds a semifinal...

The International Rock Paper Scissors Society holds regional and national championships. Each region holds a semifinal competition in which contestants play 500 games of Rock Paper Scissors. The top 20 competitors in each region are invited to the national finals. Assume that you are provided with files for the East, Midwest, and Western regions. Each file contains the following fields for the top 20 competitors: last name, first name, and number of games won. The records in each file are sorted in alphabetical order. Merge the three files to create a file of the top 60 competitors who will compete in the national championship.

Need flowchart for scenario above.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

Pseudocode screen shot:

Pseudocode:

     start

          Declarations

              InputFile easternFile

              InputFile westernFile

              InputFile midwestFile

              OutputFile playersMergedFile                            

              string easternFirstName

              string easternSecondName

              num easternScore

                     

             string midwFirstName

              string midwSecondName

              num midwScore

             

             string westernFirstName

              string westernSecondName

              num westernScore

              string END_NAME = "end"

              string ThreeEnded= "N"

             

          getReady()

          mergePlayersRecords()

          finishUpFiles()

     stop

     getRead()

          open easternFile "EasternRegion.dat"

          open westernFile "WesternRegion.dat"

          open midwestFile "MidWestRegion.dat"

          open playersMergedFile "MergePlayersRecords.dat"         

          readEastFile()

          readWestFile()

           readMidWestFile()

          checkEndofFile()

     return

     readEastFile()

          input     easternFirstName, easternSecondName, easternScore from easternFile

          if eof then

              easternFirstName = END_NAME

          endif

     return

     readMidWestFile()

          input midwFirstName, midwSecondName, midwScore from midwestFile

          if eof then

              midwFirstName = END_NAME

          endif

     return

     readWestFile()

          input westernFirstName, westernSecondName, westernScore from westernFile

         if eof then

              westernFirstName = END_NAME

          endif

     return

     checkEndofFile()

          if easternFirstName = END_NAME then

              if midwFirstNname = END_NAME then

                   if westernFirstName = END_NAME then

                        ThreeEnded = "Y"

                   endif

              endif

          endif

     return

     mergePlayersRecords()

          if easternFirstName < midwFirstName then

              if easternFirstName < westernFirstName then

                   output easternFirstName, easternSecondName, easternScore to playersMergedFile

                   readEastFile()

              endif

          else

              if midwFirstName < westernFirstName then

                   output midwFirstName, midwSecondName, midwScore to playersMergedFile

                   readMidWestFile()

          else

              output westernFirstName, westernSecondName, westernScore to playersMergedFile

              readWestFile()

          endif

          checkEnd()

     return

     finishUpFiles()

          close easternFile

          close westernFile

          close midwestFile

          close playersMergedFile

     return

Add a comment
Know the answer?
Add Answer to:
The International Rock Paper Scissors Society holds regional and national championships. Each region holds a semifinal...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using python 3.7.3 Challenge: Rock, Paper, Scissors GamePDF Description: Create a menu-driven rock, paper, scissors game...

    Using python 3.7.3 Challenge: Rock, Paper, Scissors GamePDF Description: Create a menu-driven rock, paper, scissors game in Python 3 that a user plays against the computer with the ability to save and load a game and its associated play statistics. Purpose: The purpose of this challenge is to assess the developer’s ability to create an interactive application with data persistence in Python 3. Requirements: Create a Rock, Paper, Scissors game in Python named rps.py according to the requirements specified in...

  • It's writing a simple rock paper scissors game strictly following the instructions. INSTRUCTIONS: If the user...

    It's writing a simple rock paper scissors game strictly following the instructions. INSTRUCTIONS: If the user selects 'p': 1. First the program should call a function named getComputerChoice to get the computer's choice in the game. The getComputerChoice function should generate a random number between 1 and 3. If the random number is 1 the computer has chosen Rock, if the random number is 2 the user has chosen Paper, and if the random number is 3 the computer has...

  • Acme Paper: Selecting a Diverse Team[i] Acme is a national manufacturer of paper products. They provide...

    Acme Paper: Selecting a Diverse Team[i] Acme is a national manufacturer of paper products. They provide a full range of napkins, toilet paper, tissues, paper liners, etc. for restaurants, hotels, and other businesses. Their headquarters is in Albuquerque, New Mexico. They have been in operation for over 30 years, and recently have taken on some larger accounts, fueling rapid growth in the last 5 years. Now Acme has a chance to obtain a major account in a new (to them)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT