Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The one - dimensional ( 1 D ) array TeamName [ ] contains the names of teams in a sports league. The two - dimensional

The one-dimensional (1D) array TeamName[] contains the names of teams in a sports league.
The two-dimensional (2D) array TeamPoints[] contains the points awarded for each match.
The position of each teams data in the two arrays is the same. For example, the team stored at
index 10 in TeamName[] and TeamPoints[] is the same.
The variable LeagueSize contains the number of teams in the league. The variable MatchNo
contains the number of matches played. All teams have played the same number of matches.
The arrays and variables have already been set up and the data stored.
Each match can be played at home or away. Points are recorded for the match results of each
team with the following values:
3 away win
2 home win
1 drawn match
0 lost match.
Write a program that meets the following requirements:
calculates the total points for all matches played for each team
counts the total number of away wins, home wins, drawn matches and lost matches for each
team
outputs for each team:
name
total points
total number of away wins, home wins, drawn matches and lost matches
finds and outputs the name of the team with the highest total points
finds and outputs the name of the team with the lowest total points.
You must use pseudocode and add comments to explain how your code works.
You do not need to declare any arrays, variables or constants; you may assume that this has
already been done.
All inputs and outputs must contain suitable messages.
You do not need to initialise the data in the arrays TeamName[] and TeamPoints[] or the
variables LeagueSize and MatchNo

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

What is making this error pop up ?

Answered: 1 week ago