Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There were 17 games in the regular NFL 2017 Season. Each final game score is represented by a pair of integers: scoreTeam1 and scoreTeam2. Assume
There were 17 games in the regular NFL 2017 Season. Each final game score is represented by a pair of integers: scoreTeam1 and scoreTeam2. Assume that your favorite NFL team is the San Francisco 49ers! Using the Scanner class, write a Java application that prompts the user for 17 pairs of integers representing the outcomes of the 17 games. For each pair of integers, the first number is always the score of the San Francisco 49ers, and the second number is always the opponent's score The purpose of your Java application is to printout at the end of the regular season the number of games won, the number of games lost, and the number of ties. For example, here is a possible dialog between the program and the user. Note that the//comments on the extreme right of each line are additional annotations for your convenience, they are not part of the dialog; furthermore, the scores in this example are made up (fictitious): Please enter result of Game 1: 34 28 Please enter result of Game 2: 3 29 Please enter result of Game 3: 7 27 Please enter result of Game 4: 35 11 Please enter result of Game 5: 28 1 Please enter result of Game 6: 17 17 Please enter result of Game 7: 20 28 Please enter result of Game 8: 14 14 Please enter result of Game 9: 20 28 Please enter result of Game 10: 35 28 Please enter result of Game 11: 34 20 Please enter result of Game 12: 21 21 Please enter result of Game 13: 34 Please enter result of Game 14: 35 21 Please enter result of Game 15: 13 20 Please enter result of Game 16: 21 10 Please enter result of Game 17: 49 27 Output l T r L l W 28 Season W-L-T Summary: Won: 9 Lost: 5 Tied: 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started