what is singleton class?what are its advantages?elaborate..
Printable View
what is singleton class?what are its advantages?elaborate..
There can be only a single instance of a singleton. The advantage is that all users communicate with the same object without having to explicitly pass a reference to the object through out the code or using a global variable
How can I implement singleton class?Explain with sample program.
There are hundreds of existing samples...Do a search, if you have questions regarding a specific sample, I will try to help....
gurus help those who help themselves...ps:we dont do homework...
Have a look at Exploring the Singleton Design Pattern
Singleton...
Did no-one else think that they sounded like homework questions?
A "please" would have been nice...
The posters of these days... ;)Quote:
Originally Posted by Graham
Well...that is why they only got a link (cost me about 10 seconds copy/paste)....otherwise, I might have posted a little bit more... :DQuote:
Originally Posted by Graham
Andreas (and Ejaz) you are a kinder man than I....
Well...nah....it is only because it is Tuesday....and Tuesday is my generous day... ;)Quote:
Originally Posted by TheCPUWizard
Especially on THIS Tuesday - Happy Mardi Gras :D
I know that I post out of topic, but what is this Mardi Gras thing. I heard so many times about Mardi Gras. Is it a day of celebration in New Orleans?Quote:
Originally Posted by TheCPUWizard
Not to take this too off topic. Funny you should ask that. According to my calander (it's a "stupid fact a day" type):Quote:
Originally Posted by cilu
Mardi Gras means "Fat Tuesday", signifying the last day before the Lenten fasting season.
So, it's a day to stuff yourself, before you have to fast! ;)
Viggy
Quote:
Mardi Gras is a traditional holiday celebrated in many of the southern states of the USA. The most famous celebration takes place in New Orleans, Louisiana. The people there enjoy this celebration by going to parades where they catch "beads, doubloons, cups, and trinkets" that are all thrown from floats.
They have masquerade balls and dress up in costumes for these events. King Cakes are eaten during this holiday. Mardi Gras is known as the "biggest free show on earth."
The History of Mardi Gras...