adspace


Describe a pattern that is not the factory pattern? How is it used and when?

Answer Posted / Shailendra Kumar Dwivedi

One example of a design pattern different from the Factory Pattern is the Singleton Pattern. This pattern ensures that a class has only one instance, providing a global point of access to it. It is typically used when exactly one object is needed to coordinate actions across the system or when expensive object creation must be minimized.nnFor example, consider a logging utility in an embedded system. A singleton can ensure that only a single logging instance exists, directing all log messages to a central location for efficient processing and analysis.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Would you call yourself a craftsman (craftsperson) and what does that word mean to you?

930


What is your experience with qa engineering?

928


Tell me about some of your hobby projects that you've written in your off time.

975


What software languages have you used to design, develop, and debug software application interfaces?

944


Are you still writing code? Do you love it?

864