C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 1)
1.
Which of the following type of class allows only one object of it to be created?
Virtual class
Abstract class
Singleton class
Friend class
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
104 comments Page 2 of 11.

Sudhir said:   1 decade ago
To answer in simple words, singleton class is the one having only one instance of it created. This is the condition to be satisfied by a class to be singleton.

Maha said:   1 decade ago
Difference between virtual and friend class ?

Manivannan said:   1 decade ago
What is a singleton class ?

Animesh priyadarshi said:   1 decade ago
In object-oriented programming , a singleton class is a class that can have only one object (an instance of the class) at a time. For example, using Visual C++ , the "Application" class is an example of a singleton class. You can only create only one object of an Application class.

Nithya said:   1 decade ago
What is the purpose of singleton ?

Susi said:   1 decade ago
Tell me also what is singleton class ?

Difference between virtual and friend class ?

How to make singleton class ?

I can't get your definition. Can you make me understand easier ?

Ramya said:   1 decade ago
How to use singleton class in our program?

Greeshma said:   1 decade ago
Can you explane brifly like how to use a singleton class in a program?

Animesh priyadarshi said:   1 decade ago
@ nithya if in a class we don't want more than one object then we can choose singleton class..its purpose is to create only one object at a time

Nilesh said:   1 decade ago
Using any class we can create any number of objects 1, 2, 3. So on then why to use singleton class?


Post your comments here:

Your comments will be displayed after verification.