features of OOPS

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


Please Help Members By Posting Answers For Below Questions

i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1837


What is object and class in oops?

588


• What are the desirable attributes for memory managment?

1728


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

944


What is class and example?

569






What is encapsulation in simple terms?

541


explain sub-type and sub class? atleast u have differ it into 4 points?

1836


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

1661


What is the highest level of cohesion?

579


What does <> mean pseudocode?

624


How long to learn object oriented programming?

565


Why is there no multiple inheritance?

570


Why multiple inheritance is not possible?

602


What is object-oriented programming? Webopedia definition

725


Is enum a class?

607