You are creating a class named Game.
The Game class must meet the following requirements:
Include a member that represents the score for a Game instance.
Allow external code to assign a value to the score member.
Restrict the range of values that can be assigned to the score member.
You need to implement the score member to meet the requirements.
In which form should you implement the score member?
A.
protected field
B.
public static field
C.
public static property
D.
public property
D
A public property can be read by all other types. The protected set modifier restricts changes to derived types.
Include a member that represents the score for a Game instance = non static
Restrict the range of values that can be assigned to the score member= property
Allow external code to assign a value to the score member public