Answer Posted / pratap557
Class: an Abstract Model of a real world entity or Concept
or thinking. Like Car , Human being, PayRoll,etc.
Object: An instance( which is besically representing the
class)shows class's attributes through some public or
private method(internally)
Method: private or public functions associted with a Calss
to access the Class (Object)
Massage Passing: Interaction(exchanging data) between two
objects
Abstraction : This is a concept by which we only acess the
necessary attributes of that calsss without knowing more
about the other attrkibutes or methods opf that cals( some
waht like wrapping)
Encapsulation: Hiding data (attributes of a class from
other)by eclaring private , public etc
Inheriatance: Creating new class from patrent class. As
Mammal class is inherited from Animal Class again Human
being is achild class of Mammal
polymorphism: method overloading, virtual functions
Is This Answer Correct ? | 91 Yes | 23 No |
Post New Answer View All Answers
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is object and class in oops?
• What are the desirable attributes for memory managment?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
What is class and example?
What is encapsulation in simple terms?
explain sub-type and sub class? atleast u have differ it into 4 points?
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
What is the highest level of cohesion?
What does <> mean pseudocode?
How long to learn object oriented programming?
Why is there no multiple inheritance?
Why multiple inheritance is not possible?
What is object-oriented programming? Webopedia definition
Is enum a class?