Microsoft
98-361 · Question #162
You are designing a class for an application. You need to restrict the availability of the member variable accessCount to the base class and to any classes that are derived from the base class…
The correct answer is B. Private. See the full explanation below for the reasoning.
Question
You are designing a class for an application. You need to restrict the availability of the member variable accessCount to the base class and to any classes that are derived from the base class. Which access modifier should you use?
Options
- AProtected
- BPrivate
- CPublic
- DFriend
How the community answered
(60 responses)- A8% (5)
- B83% (50)
- C3% (2)
- D5% (3)
Community Discussion
No community discussion yet for this question.