Posts

Showing posts with the label OOPS concepts

OOPs with Real time Examples

Oops! What an excellent concept. Nowadays in software filed any latest language has implemented, it should be partially are fully supported this oops concept. OOPs, let c with real time examples.   Six important factors are using this concept are, Class, 2.Objects, 3.Abstractions, 4.Encapsulation, 5.Polymorphism, and 6.Inheritance. 1.   Car Vs Class Car:   Collection of several properties like staring, break, clutch, etc each things are used for particular purpose, all these   properties are differ from each car like some car have power staring ,however we have called it's a car. Class:   it's a collection of functions and variables. The functions and variables are differing from each class. Each function is used for particular purpose however we have called it's a class 2.   Car Key   Vs   Object Car Key:   key is used for run the car. So many dummy keys can use for run a car. Object:   Object is used for run the class or invokes the cl...

PHP OOPS CONCEPTS WITH EXAMPLES

    PHP OOP Concepts Object Oriented Programming  is a paradigm which is nowadays the most popular way to develop any application and most of the modern day language is based on this paradigm. OOP or Object Oriented Programming PHP has so many features like: Class Object Polymorphism Dynamic Binding...etc. In this series of tutorial you will come to know about all the features of these features using PHP syntax. PHP Class Object In object oriented programming a class can be an abstract data type, blue print or template. You could consider the name of a class as noun like name of a person, place or thing. For example Fruit is a class, where apple, orange are the object of this class. PHP Constructor and Destructor In this current tutorial we will study about constructor and destructor of OOP.Like other OOP based languages PHP also supports constructor method for classes. As any other language's constructor method, in PHP constructor method is called for every object creati...