Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA. uestion 1 (One Dimensional Arra Write a program that asks a user for names of 8 soccer teams and outputs a possible road
IN JAVA.
uestion 1 (One Dimensional Arra Write a program that asks a user for names of 8 soccer teams and outputs a possible road map of 4 quarter finals, 2 semifinals, 1 final and the final winner of a tournament. Your program should proceed as follows: 1. Ask the user for a name for the soccer tournament followed by the names of the8 participating teams. (You can assume that each name, which can be more than 1 word, will be correctly entered on a separate line.) The participating teams are to be stored in a one-dimensional array. 2. Generate the output roadmap by choosing at random combinations of teams and a winner for each combination at each level to produce a final winner. Of course a team can only be in one quarter final game. Figure1 illustrates how teams are matched for the semi-finals and finals, Quarter-Finals Semi- Finals Quarter Final 1 (QF1) Team 1 Team 2 Semi Final 1 (SF1 Winner of QF1 Winner of QF4 Quarter Final 2 (QF2) Team 3 Team 4 Winner of SF1 Winner of SF2 Quarter Final 3 (QF 3) Team 5 Team 6 Semi Final 2 (SF2) Winner of QF2 Quarter Final 4 (QF4) Winner of QF3 Team 7 Team 8 Figure 1- Eliination TournamentStep 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