Question
Write a program that reads the contents of each of these files into a vector. It should then display the contents of the Teams.txt file
Write a program that reads the contents of each of these files into a vector. It should then display the contents of the Teams.txt file on the screen and prompt the user to enter the name of one of the teams. When the user enters a team name, the program should display the number of times that team has won the World Series in the time period from 1950 through 2014.
Teams.txt This file contains an alphabetical list of a number of Major League baseball teams that have won the World Series at least once.
Anaheim Angels Arizona Diamondbacks Atlanta Braves Baltimore Orioles Boston Americans Boston Braves Boston Red Sox Brooklyn Dodgers Chicago Cubs Chicago White Sox Cincinnati Reds Cleveland Indians Detroit Tigers Florida Marlins Kansas City Royals Los Angeles Dodgers Milwaukee Braves Minnesota Twins New York Giants New York Mets New York Yankees Oakland Athletics Philadelphia Athletics Philadelphia Phillies Pittsburgh Pirates San Francisco Giants St. Louis Cardinals Toronto Blue Jays Washington Senators
WorldSeriesWinners.txt This file contains a chronological list of World Series' winning teams from 1950 through 2014. The first line in the file is the name of the team that won in 1950, and the last line is the name of the team that won in 2014. (Note that the World Series was not played in 1994.)
New York Yankees New York Yankees New York Yankees New York Yankees New York Giants Brooklyn Dodgers New York Yankees Milwaukee Braves New York Yankees Los Angeles Dodgers Pittsburgh Pirates New York Yankees New York Yankees Los Angeles Dodgers St. Louis Cardinals Los Angeles Dodgers Baltimore Orioles St. Louis Cardinals Detroit Tigers New York Mets Baltimore Orioles Pittsburgh Pirates Oakland Athletics Oakland Athletics Oakland Athletics Cincinnati Reds Cincinnati Reds New York Yankees New York Yankees Pittsburgh Pirates Philadelphia Phillies Los Angeles Dodgers St. Louis Cardinals Baltimore Orioles Detroit Tigers Kansas City Royals New York Mets Minnesota Twins Los Angeles Dodgers Oakland Athletics Cincinnati Reds Minnesota Twins Toronto Blue Jays Toronto Blue Jays Atlanta Braves New York Yankees Florida Marlins New York Yankees New York Yankees New York Yankees Arizona Diamondbacks Anaheim Angels Florida Marlins Boston Red Sox Chicago White Sox St. Louis Cardinals Boston Red Sox Philadelphia Phillies New York Yankees San Francisco Giants St. Louis Cardinals San Francisco Giants Boston Red Sox San Francisco Giants
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