The exercise is about keeping track of the points for a 6 team sports league during a season, perhaps a “5-a-side” football league, in which the goals scored by each team should be recorded. Take some time before diving into the programming. First, assess what the program is required to do and how you will go about producing it. Develop and test your program step by step. Your completed program should: 1. Prompt the user and read in the number of a team playing the current game, i.e. Team 1, Team 2, Team 3, etc. 2. Prompt the user and read in the number of the opponent team. It is probably helpful to think of the first team as the home team for this game, and the second team as the away team. 3. Prompt the user and read in a team’s score for the current game. Use the team’s number when asking for the score in your printf statement. 4. Prompt the user and read in the opponent’s score for that game. Again, use the opponent’s team number when asking for the score. 5. Notify the user and repeat steps 3 and 4 in the case that the user enters a negative value. 6. Calculate the points earned by each team and add it to a cumulative score. A win is worth 3 points, a draw is worth 1 point and a loss is zero points. Also update the amount of games played by each team and their goals for and against. 7. Print to the screen the following header and beneath it a line of data that corresponds to the header for each team. Make sure the columns are correctly aligned. Team Played Goals for Goals against Points There is no requirement for your program to sort the teams by order of points. The teams can simply be listed from Team 1 to Team 6. 8. Terminate the program by asking the user if they wish to do so. Otherwise repeat all of the above from step 1.

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

The exercise is about keeping track of the
points for a 6 team sports league during a season, perhaps a “5-a-side” football league, in which
the goals scored by each team should be recorded. Take some time before diving into the
programming. First, assess what the program is required to do and how you will go about
producing it. Develop and test your program step by step.

Your completed program should:
1. Prompt the user and read in the number of a team playing the current game, i.e. Team 1,
Team 2, Team 3, etc.
2. Prompt the user and read in the number of the opponent team. It is probably helpful to think
of the first team as the home team for this game, and the second team as the away team.
3. Prompt the user and read in a team’s score for the current game. Use the team’s number
when asking for the score in your printf statement.
4. Prompt the user and read in the opponent’s score for that game. Again, use the opponent’s
team number when asking for the score.
5. Notify the user and repeat steps 3 and 4 in the case that the user enters a negative value.
6. Calculate the points earned by each team and add it to a cumulative score. A win is worth 3
points, a draw is worth 1 point and a loss is zero points. Also update the amount of games
played by each team and their goals for and against.
7. Print to the screen the following header and beneath it a line of data that corresponds to the
header for each team. Make sure the columns are correctly aligned.
Team Played Goals for Goals against Points
There is no requirement for your program to sort the teams by order of points. The teams can
simply be listed from Team 1 to Team 6.
8. Terminate the program by asking the user if they wish to do so. Otherwise repeat all of the
above from step 1.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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