I'm stucked with part of this assignment. The assignment is consisted on three programs, the first is the base of the others two, i did the first one already but idk how to do the second and third one, i need help! thanks
this is the first program:
// The purpose of this program is to calculate the wins, ties and losses of teams, based in function and an input file to count and define how many wins, losses and ties that each team has.
void OutResults (int wins, int ties, int losses)
{
cout << endl << "Our team had " << wins << " wins," << ties << " ties, and " << losses << " losses" << endl << endl
return;
}
-------------------------------------------------------------
and this is the full asignment:
Programming Assignment: Soccer Report
This final assignment consists of three programs:
1. Our team report
2. Any single team report
3. Multiple team report
The our-team report is worth 10 points and is due April 25. The any-team and multiple-team
report programs are worth 10 and 5 points, respectively, and are due May 2. The three programs
are to be named our.cpp, single.cpp, and multi.cpp, respectively. Functional decompositions are
to be handed in for each program.
All programs are to be written using other functions in addition to the main function.
While there can be many solutions to the soccer problems, it is expected that there will be at least
three other functions. One of these functions will prompt for and input the games data file name.
Another function will input one game. Another function will output the final wins, ties, and
losses. Hmmm… We’ll need another function to count a win, tie, or loss. So, that makes at least
four functions, not counting main.
Some of these functions, such as prompting for and inputting the file name, can be quite
short, having only a few lines. This is fine—we need to a good grasp of using functions and
interfaces. Note that the main function should have little processing in it. Instead, it should be
calling other functions as needed.
For the any-team and multi-teams report program, you are also to demonstrate a call in a
non-main function to another function. We will talk about this in class.
Our Team Report
This program will input the scores of an unknown number of soccer games from a file. Each line
in the file contains the scores for a single game, in the order our score, visitor score. For
example, the file
3 2
0 1
5 3
3 3
consists of four games. In this example, our team has two wins (3-2, 5-3), one tie (3-3), and one
loss (0-1),
The program is to output the number of wins, ties, and losses our team had. Using the
above file, the sample run will look like (user input is underlined):
Enter name of games file: our-games
Our team had 2 wins, 1 tie, and 1 loss
Any Single Team Report
The any single team report program upgrades the our team report. In this program, the games file
looks like:
Each game is a team name followed by its score followed by the other team and its score.
The program is to prompt the user for a team name and then output its record. Using the
above data file, here’s a sample run:
Enter name of games file: games
Enter name of team: Mercyhurst
Mercyhurst had 0 wins, 1 tie, and 1 loss
Multiple Team Report
The final program is simply to allow the user to enter multiple teams to find their records. Here’s
a sample run:
Enter name of games file: last-week-games
Enter name of team: Mercyhurst
Mercyhurst had 0 wins, 1 tie, and 1 loss
Enter name of team: California
California had 0 wins, 0 ties, and 1 loss
Enter name of team: Edinboro
Edinboro had 2 wins, 0 ties, and 1 loss
Enter name of team: Control-D
----------------------------
help on the last two one plis
thanks