Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are the main underlying concepts of object orientation?

Answer Posted / prasi

Abstraction - Interfaces are the best examples of
abstraction .
Encapsulation - Classes are best examples of encapsulation.

Generally we encapsulate what varies &
we abstract commonalities...

One more thing, You should always subclass for behabiours..
you should never subclass for properties / attributes. If
only properties vary, then you have got to encapsulate them
in somewhere else e.g. in a class or in some collection
object like - Properties in Java / Map

Hope this helps..

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe inheritance and non-inheritance of a derived class?

948


Can you create an instance of an abstract class?

982


What is the difference between an error and an exception?

1083


What is virtual?

1178


What are abstract classes?

999


What's the benefit of using inheritance?

1117


Explain serialization and overriding?

1074


Why are virtual users created?

1057


What is the difference between a virtual method and an abstract method?

938


What is the difference between an Abstract class and Interface?

1051


Explain what is meant by polymorphism?

1072


What is static polymorphism?

1141


What is data abstraction? what are the three levels of data abstraction with Example?

978


Can you use virtual, override or abstract keywords on an accessor of a static property?

1004


Differentiate between data abstraction and encapsulation.

980