Basic concepts in Object Oriented Programming
Objects :
These are the basic runtime entities created using classes. Now it will have some memory allocated, can have some variables and it will have methods that can be called.
Inheritance :
Just adopting the properties of parent class. Inheritance is just method of editing the template that another class is representing. So, using one template you can create another template(class).
Its a big example of code reusability upon which OOP is based. Just inherit the function it enhances the code readability so much that code becomes easily understandable.
Polymorphism :
Polymorphism is simply ability to take multiple forms.
In Above code, You can see all of there functions are named "volume" but when they are called they run as per the perimeters given with them.So, polymorphism is showed by volume function.
Dynamic Binding :
You will come to know which code will run on runtime only this is data binding also called late binding.
Like if you user inputs a string to Alexa, and that string is current time. Alexa say "Good Morning / Good Evening" according to that time string.
Message Passing :
Object.message(information) - Formate
Its just a passing of data in different objects..
Comments
Post a Comment