OOP Principles: Introduction

OOP…!, When this topic comes while learning any of the programming language which is object oriented, some time may or may not, but we feel little pressure on mind & think about ‘Can I work with oop?’ or ‘Is the oop easy or difficult to understand?’ like so….
And my answer is OOP (Object-Oriented Programing) is really great think in programming to learn and also easy to understand.
When I was started learn programming, I was created my first program in Lingo. Yes absolutely correct – In Macromedia Director 6. And that time I was completely unknown about programming concepts & OOP principles.
After few months I aware about oops little bit with confused mind. but handling time to time various type of programs using oop terms, I got the good experience.
With the OOP terminology you can design the architecture of your applications or programs. It helps you to design your applications programming structure & flow. You can define the programming patterns as a library using OOP and you can use it many applications. You can make your classes reusable. Classes is one of the main thing in OOP.
If you want to learn OOP principles, learn this principles one by one and step by step with small example of code.
Look at the below,
Package – This thing allows you to organize your classes by separate groups.
Classes – Class is the collections of methods(functions) and you can make any number of instance of that. Changing its property(Variables) or passing variables by calling methods you can take different outputs from it.
Composition – Allows you to make the multiple instances of same classes. If class ‘Bike’ has a class ‘Wheel’, then relation between this classes is composition,
Inheritance – Allows you to extend new class from an existing class with all the properties and methods without doing copy paste the entire code. If class ‘Bike’ is a ‘Vehicle’, then relation between this classes is inheritance.
Polymorphism – Using the same method name in different classes and defining multiple states with single property, can allows to apply based on type or specification. You don’t need to change code every time you use different objects or components.
Encapsulation – This thing take the data & code safe or in other words we can say hiding & protecting data of an object or class.

Here I’ve discussed OOP principles in short. If you have any comment on this post. Please welcome.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *