Wednesday, May 2, 2012

Beginning Object Oriented Programming | Part 1

What Is OOP System.

Object Oriented Programming Language is basically a set of rules and concepts which makes it easy to understand and manage. Class's , inheritances , constructor, destructor, abstractor class are the concept provided by OOPS.

Class :- 
        In case of OOPS a Class is a collection of Data Member (Variables, Properties ) and  Member Function (Called Function or Methods). Data members are used to store the Information where member function are used to operate the Data Member's. In case of  PHP member of classes have friendly accessifier , however one can define the explicitly with one of the these Access- modifier:-
  1. Private :- The members which one defined  as private keyword , only accessible within the class, No one can access them outside of the Class , even Object of the Class.
  2. Public:- The member which one are defined as  Public Keyword can be accessed within  a Class and outside of the Class. Those member function can be accessed with object of that class or with class name depends upon access-modifier. 
  3. Protected:-   Protected member function like as private member but protect functions  can be inherited one level down while private are not.
Syntax For the Class :-


class <class name >
{
Public $datamember; // In this section we can defile data member as Private, Public or Protected.

public function <function name(method)>
               {
          //code to operate the data member's goes here.
               }



}



To be Continued .........Objects

2 comments:

  1. RevealIT providing Job Oriented Courses/ 6 Months Industrial Winter Training / 6 weeks Winter training / Live Project Winter Training,Winter Training,Winter Training,to All B.Tech / B.E. / MCA/ BCA / B.Sc (IT,CS)/ All IT Students on self support basis We have tide- up with various Engineering colleges in the form of Project / Industrial Training to provide the high-end training program especially on:- PHP Winter Training

    ReplyDelete

Please Comment Here and make this blog better.