Chandra's Tech Blog

Oops Concepts In Java

Oops Concepts

Object Oriented Programming is the paradigm or methodology that is used for designing the program using its objects or classes. Generally the object is the real word things like chair, pen, table or any other. Oops concepts generally simplifies the development of software and maintain the concepts in it.

Any language is said to be a pure object oriented programming language, that should be follow the OOPS concepts (principles). However, Java is not a pure Object Oriented Programming language because in Java all are not considered to be objects. Where as small talk is the pure object oriented programming language.

Bellow are the OOPs concepts.

Object

Class

Inheritance

Polymorphism

Abstraction

Encapsulation

Object:

The entity that denotes the behavior and state is called as the Object. The objects can be logical and physical so that it can be included for the development of the software. The Software objects can be used as the real-world objects that are found in the day today life.

Class:

The collection of objects can be called as a class and it is the logical entity. The class is prototype or blueprint that are represented from the objects that is created. Class can clean the model state or behavior. Overloading Method is performed within oops class.

Inheritance:

When a single object acquires the behaviours and properties of its parent object then it is called as the inheritance. This provides the code reusability so that it can be useful for achieving the runtime polymorphism. Overriding Method occurs from two classes with the inheritance relationship. Overloading vs Overriding always varies with the class and parameter.

Polymorphism:

When a single task is performed by the two different ways then it can be called as the polymorphism. The method can be useful for convensing the customer differently or to draw in shapes like rectangle. For achieving the polymorphism, it is necessary to use the method overriding and method overloading. Composition is a type of aggregation as the object that contains other object and when the contained objects are within the existence of object then Composition takes place. The restricted aggregation can also be called as the composition.

Abstraction:

Showing functionality and hiding the internal details is called as the abstraction. The abstract class is used for achieving abstraction. Association is the special form of the abstraction as it is the relationship between two objects. The one-to-one, many-to-one, one-to-many and
many-to-many define an association between objects represents in it.

Encapsulation:

Wrapping or binding the data or code into the single units are called as the encapsulation. Wrapping a thing into different Wrapping is the encapsulation. Java is fully encapsulated class with the private data members.

Advantage of OOPs over Procedure-oriented programming language

With the help of OOPs, it will be easier for developing and maintain the software easy when compared to the Procedure-oriented programming language. It will be difficult for the Procedure-oriented programming language when the code grows along with the growth of the project size.

Data hiding is enabled in the OOPs whereas the global data could be accessed anywhere using the Procedure-oriented programming language so this process is risky.

For simulating the real world event effectively is easier with the OOPs so that the real word problem can be solved using this method. The Procedure-oriented programming language is less effective when compared to the OOPs.

Hi
Folks,
you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,