Suppose there is an Online shopping cart application having
different objects like Cart, SelectionItem, Billing,
COnfiguration, Authentication, Authorization,
PersonalDetails etc. Out of this which one can be made a
singleton pattern and why?

Answer Posted / siddharth

With singleton design pattern we can ensure the following:
1) Only one instance on the class is created
2) Provide global point of access to the object.
example: printerspoolers

So in the above question configuration can be made a
singleton design pattern as configuration is same for
everyone

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is independent and dependent variables in research?

466


How do you calculate square roots?

570


What is the use of protected in java?

530


Explain the importance of import keyword in java?

519


What is the integer of 16?

532






Explain public static void main(string args[]) in java.

524


Can arraylist hold different types java?

482


Where is the find and replace?

526


What is the loop in java?

566


How do you get length in java?

553


What is an array in java?

636


What is jee6?

532


Can we execute a program without main?

531


What are the advantages of user defined functions?

550


What is the common usage of serialization?

569