Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1- March Madness It's March Madness time again, and after watching a game you and a few of your friends decided that you should

image text in transcribed
image text in transcribed
image text in transcribed
Problem 1- March Madness It's March Madness time again, and after watching a game you and a few of your friends decided that you should make your own fantasy league. Being a bit tipsy at the time, you decide to modify the rules a bit. The number of teams,, can now be between and Each team may play multiple games over the course of the league, and each match earns points for both teams. .Standings in the competition are organized based on each team's current overall accumulated points. That is, the team with the largest overall point total will have a rank of 1 and the team with the smallest overall number of points will have rank When a match is played, both teams are rewarded league points according to the formula: where is the number of points scored during the match for the team and is the number of points awarded for the result of the match. The number of points awarded for each outcome of a match is defined as follows: Condition Home Win 3000 Away Win 3500 Draw 1000 Loss 50 For example, if the Truckers were to play at home against the Trekkers and the score at the end of the match was 70-60 in favour of the Truckers, then the Truckers would be awarded a total of 3000 + 70 3070 points, while the Trekkers would earn 50 + 60 # 1 10 points. Since the number of teams in the competition can now get so large, and the points system is so complicated, you decide to write a program that can tell you the current standings in the competition You will be given lines of input. Each line will provide the outcome of a match. A match result will contain 2 strings denoting the names of the two teams that played, and then 2 integers denoting the scores of the teams respectively. The team named first is the home team for the match. After all match results have been posted, determine the team that places first and the one that places last in the league. In case there is a tie, the team that earns the tied points earliest in the league wins the tie

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions