In OOPS , Part 1, I have explained about the SOFTWARE DEVELOPMENT . In this post i will provide you some basic terms with definitions that is used in software development based on Object-oriented programming. In upcoming posts i will provide detail explanation of every term.
What is object-oriented programming?
- OOPs had emerged to overcome the flaws of procedural programming language where we write list of instructions in groups inside function and we merely concentrate on data.
- OOPs is the way of thinking which demonstrates that how we can approach towards problem solving and it guides in inventing a method for software creation and organization.
- In OOPs data is critical element and it is bound with the function(method) that operates on it.
- In OOPs problems are decompose into number of entities called objects and then we build data and function around those entities rather than action and logic.
Apart from these there can be many way we can define OOPs and there are many advantages of OOPs that you will learn gradually while programming practice.
What is Object?
An Object is a "thing" or Anything can be represented as an object. Example : a person, a city or anything that come in your mind can be treated as an object in OOPs.
An object is run-time entities in OOPs which represent an instance of class. It contains data and code to manipulate those data.
What is class?
A class is user-defined data-type in OOPs.class is collection of object of same type. class is a blueprint or template for creating an object. class is used to define variables and methods which is common to all objects of same kind.
what is state?
As using class we create an object and for a particular object we set the values for the attributes and that represents the state of the object.
What is Method?
The method describes the abilities of objects or in other word we ca say it represents the behavior of an object.
what is Instance?
The actual object created at run-time called as the instance. The actual object created is called as an instance of class.
what is message passing?
Message passing called as the method calling. It is the way to establish communication between two objects.
what are important pillars of Object - Oriented Programming?
What is class?
A class is user-defined data-type in OOPs.class is collection of object of same type. class is a blueprint or template for creating an object. class is used to define variables and methods which is common to all objects of same kind.
what is state?
As using class we create an object and for a particular object we set the values for the attributes and that represents the state of the object.
What is Method?
The method describes the abilities of objects or in other word we ca say it represents the behavior of an object.
what is Instance?
The actual object created at run-time called as the instance. The actual object created is called as an instance of class.
what is message passing?
Message passing called as the method calling. It is the way to establish communication between two objects.
what are important pillars of Object - Oriented Programming?
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
Abstraction: Abstraction let us focus on "what" instead of "how" means it lets the user to represent the essential features (means what he can do) by hiding the details running in background(means users don't need to worry about how it is doing).
Inheritance: it supports the concepts of hierarchy in OOPs. it is the process by which object of one class acquires the properties of object of another class. it brings the concept of re-usability in object oriented programming.
Polymorphism: Poly(many) + morph(forms)= polymorphism(many forms). Its an ability to more than one form. One method can exhibit different behavior in different instance.
Benefits of OOPs:
- Through inheritance, we can eliminate redundant code and extend the use of existing classes means it brings re-usability.
- We can build programs from the standard working modules which can communicate with one another, rather than having to start writing the code from scratch. This reduces the development time and leads to higher productivity.
- The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program.
- It is easy to partition the work in a project based on objects.
- Message passing techniques for communication between objects makes the interface descriptions with external systems much simpler.
- Software complexity can be easily managed.