Question: Java Programming. What can be used are: arrays, loops, if statements, and if-else statements. As for libraries, only import java.util.Scanner; can be used. This program

Java Programming. What can be used are: arrays, loops, if statements, and if-else statements. As for libraries, only import java.util.Scanner; can be used.

This program is about generating a road map of matches and related goal statistics in the FIFA World Cup Final. The game is repeated until your favourite soccer team (country) wins the Final in a tournament, or until a maximum number of tournaments. For simplicity, we will start from the Round of 16. Assume that you are given the list of 16 countries in an array. You will ask the user for his/her favourite team (keyboard input). Your program will then output a possible road map of 8 matches in the Round of 16, 4 Quarter Finals, 2 Semi-Finals, 1 Final, and the final winner of a tournament. A tournament is repeated (with the same list of countries) until the users chosen team wins, or the max number of tournaments specified in the program has reached (e.g., 20 tournaments). At the end, you will show total scores in each match, the average goals for each tournament, the overall average for all tournaments in the game, and the total number of matches where the number of goals is greater than the overall average.

Note that a match is played between two teams/countries, a tournament consists of all the matches leading to a final winner (i.e., all matches including the final), and the game includes all the tournaments until your favourite team wins, or the max tournament count is reached.

Java Programming. What can be used are: arrays, loops, if statements, and

Screen Shot 2018-11-00 st 10.41.23 PM Screen Shot 2018-11-08 1a41 41 PM Screen Shot 2018-11-09 at 10.4149 PPM 1 le C , 2.?), there '58 30 minute sudden death pened. 859ame thet one term wt15rore Question 1 (One and Two Dimensional Arra This program is about generating a road map of matches and related goal statistics in the FIFA World Cup Final. The game is repeated until your favourite soccer team (country) wins the Final in a tournament, or until a maximum number of tournaments. For simplicity, we will start from the Round of 16. Assume that you are given the list of 16 countries in an array. You will ask the user for his/her favourite team (keyboard input). Your program will then output a possible road map of 8 matches in the Round of 16, 4 Quarter Finals, 2 Semi-Finals, 1 Fina, and the final winner of a tournament. A tournament is repeated (with the same list ot countries) until the user's chosen team wins, or the max number of tournaments specified in the program has reached (eg, 20 tournaments). At the end, you will show total scores in each match, the average goals for each tournament, the overall average for all tournaments in the game, and the total number ot matches where the number of goals is greater than the overall average. sudden deah goa. In either case, you show the final score line, and the wier moves to the nex phse. The final match winner is the FIFA World Cup WInner of 2018 herare the tournament unbiyour tavourite teom wnoldue to random goel selection, the score- s wilcha achne), ar you reach the mcomum tournament count Sample ourput from the program the userinput is shown in grey Note that a match is played between two teans/countries, a tournament consists of all the matches leading to a final winner ie, all matches including the final), and the game includes all the tournaments until your favourite tean wins, or the max tournament count is reached S. H your team does not win ie, he game ended when you reach the max tournament Your program should proceed as follows 1. The names of the teams are provided as an array of Strings count. show the following message after the output in prt 3 above (insted of showing ..It took 1 tournamen$(5) t the game tot Japan 1n!!!,,). You stll need to show the goal statistics as in part 4 2. Ask user for her favourite team. If the provided team does not exist in the 16 names, you lenore exit with a proper message (eeceam is not in the Round ot i case, and any additional white-spaces entered by the user 4. You abo need to keep couts of the toal goals scored in each play, and at the end of the 3. Generate the output roadmap as follows. Choose teams in pairs for each match (eg take the first two teams from your array for Match 1, and the next two teams for Matdh 2, and so on. The winner of each match is selected as follows: in the given 90-minute period, each team scores between 0 to 4 goals (generated randomly using the Java Random class), the tean with more goals wins. If the play is a draw after 90 minutes show the followine total goals from each maich in a tournament and the average eal for each tournament, the average goal for the entire game (l matches inall tourmarents), the number of matche5 wth scores greater therte veral 1verage Amer eath metth, you need to store the total gos n thet metth for celtulsting the ebve suti20 array wi single digit is kept atter the decimal point for the real numbers (averapes). Sample output fallawing the score Ines in the pert 3 examplel: needed Nete that COMP248/Fall 2018 Assignment 3 Page 1 of5 Page 2 ofS Screen Shot 2018-11-00 st 10.41.23 PM Screen Shot 2018-11-08 1a41 41 PM Screen Shot 2018-11-09 at 10.4149 PPM 1 le C , 2.?), there '58 30 minute sudden death pened. 859ame thet one term wt15rore Question 1 (One and Two Dimensional Arra This program is about generating a road map of matches and related goal statistics in the FIFA World Cup Final. The game is repeated until your favourite soccer team (country) wins the Final in a tournament, or until a maximum number of tournaments. For simplicity, we will start from the Round of 16. Assume that you are given the list of 16 countries in an array. You will ask the user for his/her favourite team (keyboard input). Your program will then output a possible road map of 8 matches in the Round of 16, 4 Quarter Finals, 2 Semi-Finals, 1 Fina, and the final winner of a tournament. A tournament is repeated (with the same list ot countries) until the user's chosen team wins, or the max number of tournaments specified in the program has reached (eg, 20 tournaments). At the end, you will show total scores in each match, the average goals for each tournament, the overall average for all tournaments in the game, and the total number ot matches where the number of goals is greater than the overall average. sudden deah goa. In either case, you show the final score line, and the wier moves to the nex phse. The final match winner is the FIFA World Cup WInner of 2018 herare the tournament unbiyour tavourite teom wnoldue to random goel selection, the score- s wilcha achne), ar you reach the mcomum tournament count Sample ourput from the program the userinput is shown in grey Note that a match is played between two teans/countries, a tournament consists of all the matches leading to a final winner ie, all matches including the final), and the game includes all the tournaments until your favourite tean wins, or the max tournament count is reached S. H your team does not win ie, he game ended when you reach the max tournament Your program should proceed as follows 1. The names of the teams are provided as an array of Strings count. show the following message after the output in prt 3 above (insted of showing ..It took 1 tournamen$(5) t the game tot Japan 1n!!!,,). You stll need to show the goal statistics as in part 4 2. Ask user for her favourite team. If the provided team does not exist in the 16 names, you lenore exit with a proper message (eeceam is not in the Round ot i case, and any additional white-spaces entered by the user 4. You abo need to keep couts of the toal goals scored in each play, and at the end of the 3. Generate the output roadmap as follows. Choose teams in pairs for each match (eg take the first two teams from your array for Match 1, and the next two teams for Matdh 2, and so on. The winner of each match is selected as follows: in the given 90-minute period, each team scores between 0 to 4 goals (generated randomly using the Java Random class), the tean with more goals wins. If the play is a draw after 90 minutes show the followine total goals from each maich in a tournament and the average eal for each tournament, the average goal for the entire game (l matches inall tourmarents), the number of matche5 wth scores greater therte veral 1verage Amer eath metth, you need to store the total gos n thet metth for celtulsting the ebve suti20 array wi single digit is kept atter the decimal point for the real numbers (averapes). Sample output fallawing the score Ines in the pert 3 examplel: needed Nete that COMP248/Fall 2018 Assignment 3 Page 1 of5 Page 2 ofS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!