OBJECT ORIENTED PROGRAMMING
oops : object oriented programming style
* includes class
ex
making templet animal
class : animal : type of animal
name
sound
by using that template let we make a animal dog having specification under that template
so some data/ variable comes out
animal.typeofanimal = dog
animal.name = tommy
animal.sound = bark
Object orientation
make class : inside class make object
will treat data as a critical elements
decomposes the problem onto objects
like animal is class and dog , cat are objects
Terminology
Class : basic templet
Object : basic run time entities under some class
Data Abstraction and Encapsulation : wrapping data and function into single units
inheritance : Properties of one class can be inherited into others
Polymorphism : ability to take more than one form (ex : func. overload)
Dynamic Binding: Code which will execute is not known until the program runs
Message passing: passing info between objects call format object.message(information)
Benefits
*Better code reussability using object anfd inheritance
* Data hiding is amazing
* multiple object can exists
*software complexity can easily be maintaned
Comments
Post a Comment