Question: Why is the players name not changing ? Any help with my code ? I want to do two games but the second game with

Why is the players name not changing ? Any help with my code ? I want to do two games but the second game with a different name . Java
Why is the players name not changing ? Any help with my
code ? I want to do two games but the second game
with a different name . Java Player.java Game.java x gameDriver.java 1 package

Player.java Game.java x gameDriver.java 1 package CHPP; 2 3 public class Game { 4 private Player player; 5 6e public Game(Playerll player) 7 8 this.player = new Player player. length); 9 for(int i = 0; i max) 42 43 max = player[i].getScore(); 44 index = 1; 45 46 return player(index); 48 49 ww non*EASERSHES Eelipe File SOOD Recto Navigate Search Project Run Window eclipse-workspace - Chapter 182PPE .. Player.java Game.java gameDriver.java X 1 package CHPP: 2 3 public class gameDriver { 40 public static void main(String[] args) Player player = new Player [4]; player(0] = new Player("Joe"); player [1] = new Player("Sam"); 8 player [2] = new Player("Mary"); 9 player(3) = new Player("Sue"); 10 11 Game game = new Game(player); game.start(); game.end(); Player winner = game, decideWinner(); 15 System.out.println("The winner is: " + Winner); 16 17 Player() s1 = new Player [4]; si[= new Player("ben"); s1[1] = new Player("fake"); $1[2] = new Player("rose"); s1[3] = new Player("mike); Game gamei = new Game(s1); game.starto: game.end(); 31 Writable 6.07 21 60 Problems Javadoc Declaration Consolex *** BEBEELD sterminated> gameDriver (Java Application) /Library/Java/JavaVirtual Machines/jdk-13.0.2.dk/Contents/Hon Game has started Player: Joe Score:53 Rank:Level 1 Player:Sam Score: 35 Rank: Level 1 Player:Mary Score:33 Rank:Level 1 Player:Sue Score:63 Rank:Level 1 Game Ended The winner is: Player:Sue Score: 63 Rank:Level 1 Game has started Player:Joe Score: 105 Rank: Level 1 Player:Sam Score:79 Rank:Level 1 Player:Mary Score:66 Rank: Level 1 Player:Sue Score: 100 Rank:Level 1 Game Ended. 32.28 636 199M of 256M

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!