now we have to flesh out the details of our two classes the simstats class looks pretty easy-let' tackle that one first implementing simstats the constructor for simstats just needs to initialize the four counts to here is an obvious approachclass simstatsdef __init__(self)self winsa self winsb self shutsa self shutsb now let' take look at the update method it takes game as normal parameter and must update the four counts accordingly the heading of the method will look like thisdef update(selfagame)but how exactly do we know what to dowe need to know the final score of the gamebut this information resides inside of agame rememberwe are not allowed to directly access the instance variables of agame we don' even know yet what those instance variables will be our analysis suggests the need for new method in the rballgame class we need to extend the interface so that agame has way of reporting the final score let' call the new method getscores and have it return the score for player and the score for player now the algorithm for update is straightforward def update(selfagame)ab agame getscores(if ba won the game self winsa self winsa if = self shutsa self shutsa elseb won the game self winsb self winsb if = self shutsb self shutsb we can complete the simstats class by writing method to print out the results our printreport method will generate table that shows the winswin percentageshutoutsand shutout percentage for each player here is sample outputsummary of games