Programming Language: C++ Please use the resources included and provide notes for understanding. Thanks in advance. Code two functions to fill an array with the names of every World Series-winning team from 1903 to 2020, then output each World Series winner with the number of times the team won the championship as well as the years they won them. The input file is attached, along with the main function and screenprint. Please note team names that include two words, such as Red Sox, have an underscore in place of the space. This enables you to use the extraction operator with a single string variable. The following resources are included: Here is main. #include #include #include using namespace std; // Add function declarations and documentation here void fill(string teams[], int size); void findWinner(string teams[], int size); int main() { const int SIZE = 118; int lastIndex; string team[SIZE]; fill(team, SIZE); findWinner(team, SIZE); return 0; } // Add function definitions here Here is your input file. It contains the list of all World Series winners by year in ascending order. The first World Series was played in 1903.  WorldSeriesChampions.txt Americans No_Series Giants White_Sox Cubs Cubs Pirates Athletics Athletics Red_Sox Athletics Braves Red_Sox Red_Sox White_Sox Red_Sox Reds Indians Giants Giants Yankees Senators Pirates Cardinals Yankees Yankees Athletics Athletics Cardinals Yankees Giants Cardinals Tigers Yankees Yankees Yankees Yankees Reds Yankees Cardinals Yankees Cardinals Tigers Cardinals Yankees Indians Yankees Yankees Yankees Yankees Yankees Giants Dodgers Yankees Braves Yankees Dodgers Pirates Yankees Yankees Dodgers Cardinals Dodgers Orioles Cardinals Tigers Mets Orioles Pirates Athletics Athletics Athletics Reds Reds Yankees Yankees Pirates Phillies Dodgers Cardinals Orioles Tigers Royals Mets Twins Dodgers Athletics Reds Twins Blue_Jays Blue_Jays Strike_cancelled_series Braves Yankees Marlins Yankees Yankees Yankees Diamondbacks Angels Marlins Red_Sox White_Sox Cardinals Red_Sox Phillies Yankees Giants Cardinals Giants Red_Sox Giants Royals Cubs Astros Red_Sox Nationals Dodgers

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Programming Language: C++

Please use the resources included and provide notes for understanding. Thanks in advance.

Code two functions to fill an array with the names of every World Series-winning team from 1903 to 2020, then output each World Series winner with the number of times the team won the championship as well as the years they won them. The input file is attached, along with the main function and screenprint. Please note team names that include two words, such as Red Sox, have an underscore in place of the space. This enables you to use the extraction operator with a single string variable.

The following resources are included:

Here is main.

#include <iostream>
#include <fstream>
#include<string>

using namespace std;

// Add function declarations and documentation here

void fill(string teams[], int size);
void findWinner(string teams[], int size);


int main()
{

const int SIZE = 118;
int lastIndex;
string team[SIZE];

fill(team, SIZE);
findWinner(team, SIZE);

return 0;
}

// Add function definitions here

Here is your input file. It contains the list of all World Series winners by year in ascending order. The first World Series was played in 1903. 

WorldSeriesChampions.txt

Americans
No_Series
Giants
White_Sox
Cubs
Cubs
Pirates
Athletics
Athletics
Red_Sox
Athletics
Braves
Red_Sox
Red_Sox
White_Sox
Red_Sox
Reds
Indians
Giants
Giants
Yankees
Senators
Pirates
Cardinals
Yankees
Yankees
Athletics
Athletics
Cardinals
Yankees
Giants
Cardinals
Tigers
Yankees
Yankees
Yankees
Yankees
Reds
Yankees
Cardinals
Yankees
Cardinals
Tigers
Cardinals
Yankees
Indians
Yankees
Yankees
Yankees
Yankees
Yankees
Giants
Dodgers
Yankees
Braves
Yankees
Dodgers
Pirates
Yankees
Yankees
Dodgers
Cardinals
Dodgers
Orioles
Cardinals
Tigers
Mets
Orioles
Pirates
Athletics
Athletics
Athletics
Reds
Reds
Yankees
Yankees
Pirates
Phillies
Dodgers
Cardinals
Orioles
Tigers
Royals
Mets
Twins
Dodgers
Athletics
Reds
Twins
Blue_Jays
Blue_Jays
Strike_cancelled_series
Braves
Yankees
Marlins
Yankees
Yankees
Yankees
Diamondbacks
Angels
Marlins
Red_Sox
White_Sox
Cardinals
Red_Sox
Phillies
Yankees
Giants
Cardinals
Giants
Red_Sox
Giants
Royals
Cubs
Astros
Red_Sox
Nationals
Dodgers

Enter team: Phillies
Phillies won the World Series in 1980
Phillies won the World Series in 2008
Run another search? (y/n): n
Here is a list of each World Series winner
and the number of times they won the series
Americans won 1 World Championships
No_Series won 1 World Championships
Giants won 8 World Championships
White_Sox won 3 World Championships
Cubs won 3 World Championships
Pirates won 5 World Championships
LAthletics won 9 World Championships
Red_Sox won 8 World Championships
Braves won 3 World Championships
Reds won 5 World Championships
Indians won 2 World Championships
Yankees won 27 World Championships
Senators won 1 World Championships
Cardinals won 11 World Championships
Tigers won 4 World Championships
Dodgers won 7 World Championships
Orioles won 3 World Championships
Mets won 2 World Championships
Phillies won 2 World Championships
Royals won 2 World Championships
Twins won 2 World Championships
Blue_Jays won 2 World Championships
Strike_cancelled_series won 1 World Championships
Marlins won 2 World Championships
Diamondbacks won 1 World Championships
Angels won 1 World Championships
Astros won 1 World Championships
Nationals won 1 World Championships
C: \Users\wtmin\source\repos\ConsoleApplication2\Debug
To automatically close the console when debugging sto
Press any key to close this window . .
Transcribed Image Text:Enter team: Phillies Phillies won the World Series in 1980 Phillies won the World Series in 2008 Run another search? (y/n): n Here is a list of each World Series winner and the number of times they won the series Americans won 1 World Championships No_Series won 1 World Championships Giants won 8 World Championships White_Sox won 3 World Championships Cubs won 3 World Championships Pirates won 5 World Championships LAthletics won 9 World Championships Red_Sox won 8 World Championships Braves won 3 World Championships Reds won 5 World Championships Indians won 2 World Championships Yankees won 27 World Championships Senators won 1 World Championships Cardinals won 11 World Championships Tigers won 4 World Championships Dodgers won 7 World Championships Orioles won 3 World Championships Mets won 2 World Championships Phillies won 2 World Championships Royals won 2 World Championships Twins won 2 World Championships Blue_Jays won 2 World Championships Strike_cancelled_series won 1 World Championships Marlins won 2 World Championships Diamondbacks won 1 World Championships Angels won 1 World Championships Astros won 1 World Championships Nationals won 1 World Championships C: \Users\wtmin\source\repos\ConsoleApplication2\Debug To automatically close the console when debugging sto Press any key to close this window . .
Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY