Question: How is the Monostate pattern typically implemented? a . By ensuring only one instance of the class is created using a private constructor. b .
How is the Monostate pattern typically implemented?
a
By ensuring only one instance of the class is created using a private constructor.
b
By making all data members of the class static, so they are shared by all instances.
c
By using a factory pattern to control the creation of instances.
d
By storing a global reference to a single instance of the class.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
