April 19, 2018
Start by downloading an updated version of the Game
class: Game_V2.
Look for /* New code below, what is above is unchanged.*/
and compare with your answers. Have a look at the Program
class as well, and make sure you understand how it works.
players
, names
and scores
attributes.AddAPlayer
methods: one that takes a string as argument, the name of the new player, and one that takes a string and an integer as arguments, the name and score of the new player.Reproduce what we did in class today:
Game
objects,Can you also try to compute the average of each player?