Question: JAVA Imagine that two baseball teams, Rangers and Yankees, play in the World Series Championship games this year. Write a Java program that can store

JAVA

Imagine that two baseball teams, Rangers and Yankees, play in the World Series Championship games this year. Write a Java program that can store the imagined scores (home runs) of each team at the end of the first official nine innings of each game. The program reads the scores of each team from the console and stored them in data variables. At the end, the program displays (to the console) the result of each game, i.e. which team is winning (we assume no tie game) at the end of the 9th inning, and displays the team who wins the series. The Championship series end if one of the teams wins 4 games. Create two single-dimensional arrays with 7 cells to save game scores of each team.

Sample of the output:

Game 1: Rangers wins.

Game 2: Yankees wins.

Game 3: Rangers wins.

Game 4: Rangers wins.

Game 5: Rangers wins.

Rangers wins the Championship!

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!