Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Word Series Task : Write a C++ program that displays the contents of the Teams.txt file on the screen and prompts the user to enter

Word Series

Task: Write a C++ 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 2012.

Input: The name of one of the teams displayed from the Teams.txt file.

Processing: Read the contents of the WorldSeriesWinners.txt file into a vector. When the user enters the name of a team, the program should step through the vector counting the number of times the selected team appears.

Output: The number of times the team entered as input has won the world series and the year(s) that they won.

1.) Teams.txt This file contains a list of several major league baseball teams in alphabetical order. Each team listed in the file has 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

2.) WorldSeriesWinners.txt This file contains a chronological list of the World Series winning teams from 1903 to 2012. (The first line in 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 2012. Note that the World Series was not played in 1904 and 1994).

Boston Americans New York Giants Chicago White Sox Chicago Cubs Chicago Cubs Pittsburgh Pirates Philadelphia Athletics Philadelphia Athletics Boston Red Sox Philadelphia Athletics Boston Braves Boston Red Sox Boston Red Sox Chicago White Sox Boston Red Sox Cincinnati Reds Cleveland Indians New York Giants New York Giants New York Yankees Washington Senators Pittsburgh Pirates St. Louis Cardinals New York Yankees New York Yankees Philadelphia Athletics Philadelphia Athletics St. Louis Cardinals New York Yankees New York Giants St. Louis Cardinals Detroit Tigers New York Yankees New York Yankees New York Yankees New York Yankees Cincinnati Reds New York Yankees St. Louis Cardinals New York Yankees St. Louis Cardinals Detroit Tigers St. Louis Cardinals New York Yankees Cleveland Indians New York Yankees 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago