C Sharp (C#) - Classes and Objects
You want to track how many times each
What happens when you create two players and call
Player object has scored points. Which design correctly uses instance fields to store this state?class Player {
public int scoreCount = 0;
public void Score() {
scoreCount++;
}
}What happens when you create two players and call
Score() on each once?