Answer Posted / ayswarya
Its a Principle in which the programming module must depends
on the object of that class and not the functions.. inter
communication of classes will occur through objects of the
classes only and not directly..
It has 5 properties
1. Class and Object(methods and data members in class and
objects meant for using those methods and data members)
s. Encapsulation and Abstraction (Data Hiding and wrapping
concept)
3. Inheritance (Software re-usability- use of existing code
in our new project)
4. Polymorphism (different functions taking different
forms(values) at different situations)
5. Data Binding
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is polymorphism programming?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What is class and example?
is there any choice in opting subjects like 4 out of 7
Can we create object of interface?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< Question In a class, there is a reference or pointer of an
object of
another class embedded, and the memory is either allocated
or assigned to the new object created for this class. In
the constructor, parameters are passed to initialize the
data members and the embedded object reference to get
inialized. What measures or design change should be advised
for proper destruction and avioding memory leaks, getting
pointers dangling for the embedded object memory
allocation? Please suggest.
Question Submitted By :: Sunil Kumar
I also faced this Question!! Rank Answer Posted By
Re: In a class, there is a reference or pointer of an
object of another class embedded, and the memory is either
allocated or assigned to the new object created for this
class. In the constructor, parameters are passed to
initialize the data members and the embedded object
reference to get inialized. What measures or design change
should be advised for proper destruction and avioding
memory leaks, getting pointers dangling for the embedded
object memory allocation? Please suggest.
Answer
# 1 use copy constructors
0 Shanthila
There is something to be taken care in destructor, in copy
constructor, suppose the memory is assigned to the embedded
member object pointer with the parameter passed value, but
if some other objects of different class also are pointing
to this memory, then if some one deletes the object then
this class member pointer object will become dangling, or
if the object is not deleted properly then there will be
memory leak. Please suggest the design change required to
handle or avoid this situation Why polymorphism is used in oops? What are the benefits of polymorphism? How long to learn object oriented programming? what is the drawback of classical methods in oops? Can we create object of abstract class? What is static modifier? What is encapsulation in oop?