Design Patterns: The Four OO Basics

Before going into design patterns, one must need to know the four OO basics:

  • Abstraction is showing only the necessary details to the outside world. It is the abstract form of anything. It is implemented using interface and abstract class.
  • Encapsulation is hiding the details from the outside world. It is the opposite of abstraction. It is implemented using private and protected access modifiers inside a class.
  • Inheritance is a way for an entity to inherit the characteristics of another entity, thus establishing a parent-child relationship, or in a more technical OO term, an IS-A relationship. It is implemented using base and derived classes.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s