Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

OOOO Sprint LTE 42% 8:41 PM Lab 6 0| 01010 01010|0|0 0100 5 of 6 e 0100 4 01010

ID: 3797638 • Letter: O

Question

OOOO Sprint LTE 42% 8:41 PM Lab 6 0| 01010 01010|0|0 0100 5 of 6 e 0100 4 01010 01010 0 5 01010 01010 010 6 01010 01010 0 0 Pape 156 7 01010 0 01010 0 0 Chicago Bulls Detroit Pistons 2- New Jersey Nets Toronto Raptors 4 New York Knicks Atlanta Hawks 6 Boston Cehics 7 Indiana Pacers some code to the bottom of the following two mathods so that the table is updated afer each game is played: public void recordwinAnd Loss (team winner Team loser) I public void recordTie17ean teamAa Team teamH) ime team with index X plays another team with index Y. you should increase the value ofthe table at row X, column Y as column X. So, each game played increase esactly two values in the amay. Once you complete this code oompile and then run the test again You should see the following values in the table: 0 1 2 3 4 5 6 7 012 010 0101010 2 01010 1 01010 4 11010 01010 8 01010 01010 0 6 01010 0

Explanation / Answer

Whatever you have written is absolutely is fine!!! That is the correct way we have to implemnet.

Let me share what is happenning in the code:

In public void recordWinAndLoss(String winner, String loser), we are creating two new objects of Winning team and Lossing Team and we are passing these new objects for futher processing. But we are not setting these new objects to original table that is the reason you are not able to see the changes.

Please try folloeing code in public void recordWinAndLoss(String winner, String loser) method:

Instead of creating two new objects directly pass whatever returned from teamWithName(name) method:

replace beow recordWinAndLoss(winningTeam, lossingTeam) with:

recordWinAndLoss(this.teamWithNames(winner),this.teamWithNames(loser));

This fix should work!!!

Same for public void recordTie(String teamAName, String teamBname) method

Hope this helps..!!