The Dodgers recently won the World Series vs the Tampa Bay Rays.  Attached are two files: Teams.txt - This file contains a list of serveral Major League baseball teams in alphabetical order.  Each team is listed in the file has won the World Series at least once. WorldSeries Winners.txt - This file contains a chronological list of the World Series' winning teams from 1903-2020. (The first line of the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020.  Note the World Series was not played in 1904 or 1994.) Write a program that displays the contents of the Teams.txt file on the screen and prompts the user to enter the name of one of the teams.  The program should then display the number of times that team has won the World Series in the time period from 1903 to 2020. In the program, 2 arrays are needed:  TeamList array and Winners array.   TeamList array will contain the entries in Teams.txt. Winners array will contain the entries in WorldSeriesWinners.txt. Use a search algorithm to validate if the entry from the user is in the team list. Use a loop to count which years that team won the World Series, list the years in the output and the number of World Series wins. Add logic to loop for an additional search or exit the program. Remember to add your name in a comment on the program and have "Submitted by: Your Name" in the output. Upload your completed program source code (.cpp file)  and image of the output. Teams.txt WorldSeriesWinners.txt

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question

The Dodgers recently won the World Series vs the Tampa Bay Rays.  Attached are two files:

Teams.txt - This file contains a list of serveral Major League baseball teams in alphabetical order.  Each team is listed in the file has won the World Series at least once.

WorldSeries Winners.txt - This file contains a chronological list of the World Series' winning teams from 1903-2020. (The first line of the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020.  Note the World Series was not played in 1904 or 1994.)

Write a program that displays the contents of the Teams.txt file on the screen and prompts the user to enter the name of one of the teams.  The program should then display the number of times that team has won the World Series in the time period from 1903 to 2020.

In the program, 2 arrays are needed:  TeamList array and Winners array.  

TeamList array will contain the entries in Teams.txt.

Winners array will contain the entries in WorldSeriesWinners.txt.

Use a search algorithm to validate if the entry from the user is in the team list.

Use a loop to count which years that team won the World Series, list the years in the output and the number of World Series wins.

Add logic to loop for an additional search or exit the program.

Remember to add your name in a comment on the program and have "Submitted by: Your Name" in the output.

Upload your completed program source code (.cpp file)  and image of the output.

Teams.txt
WorldSeriesWinners.txt

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L