Saturday, 19 April 2014

What is Class

Class:-class are reference data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects become functions of the class and is referred to as Methods.(collection of  Variables, collection of Method and property)

class class_name
{        
         class Member (Method, Variable, constructor etc..)
}



Object:-Object is the basic unit of object-oriented programming. Objects are identified by its unique name. An object represents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data. An Object is a collection of data members and associated member functions also known as methods.a person or thing to which a specified action or feeling is directed.Real-world objects share two characteristics: They all have state and behavior.


object create syntax:-      ClassName objectName = new ClassName();


Example :-






Wednesday, 16 April 2014

Object Oriented Programming Concepts (OOP)

What is Object Oriented Programming

Object-oriented concepts form the base of all modern programming languages. Understanding the basic concepts of object-orientation helps a developer to use various modern day programming languages, more effectively.

Object orientation is a software development methodology that is based on modeling a real-world system

1.  Class
2.  Object
3.  Data Abstraction & Encapsulation
4.  Inheritance
5.  Polymorphism






An object means a ‘material thing’ that is capable of being presented to the senses. An object has the following characteristics:It has a stateIt may display behaviorIt has a unique identityObjects interact with other objects through messages.