Learning Object Oriented Concepts

This week, we were taught the object oriented concepts. Object-oriented programming is a style of coding that allows developers to group similar tasks into classes. This helps keep code following the tenet “don’t repeat yourself” and easy-to-maintain.

First we were told about the benefits of the DRY Programming. Then we understood the basic concepts of objects and classes.

We learned about the syntax of class.

After creating the class, a new class can be instantiated and stored in a variable using the new keyword:

 $obj = new MyClass; 

Methods are class-specific functions.

Also learned about public,private and protected properties of the classes.


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