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
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
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
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
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images