| What is Object orientated programming? |
In object oriented programming is nothing more
than the concept of better managements of the codes or scripts you send to
the compiler.
The main purposes of "Object Oriented Programming" are the followings.
How it is done or practiced? Like a manager a class holds the functions and data, and keep it separate form each other. An object is formed from the class by creating an instance of a class. In PHP we use a word "extends". When we create an object form a class, basically we can inherit the all the functionalities of the class and reuse those functionalities as needed. Inheritance is the ability of a class that uses all of the functionalities of an existing class, and extend those capabilities for custom use without re-writing the original class again and again. Did you say Structure? (Click Me) In programming Structure is ranked one step below the class, A structure contains a different types of data under one heading or name. In programming language C++, structure is used extensively. Structure (Struct) is less capable of version of a class, but more efficient in performance wise comparing with its class version. Structure is value type and Class is Reference type, there fore Struct operates directly, without suffering any performance loss. Struct does not create overhead and if you don’t have use inheritance and need to store a small group of data, struct is a better choice over class. What a class will have for us? An instance of a class is known as object. When you create a class you are going use the key word "class" and the name of the class. You will come across with the following terms associated with a class.
|