This article will help you to understand the concepts of Object-Oriented Programming(OOPs) language in Java.
Object-Oriented Programming(OOPs) is a programming model that uses “objects” to design applications and computer programs. OOPs is like a framework where programs are organized around objects and data rather than action and logic. It utilizes several techniques including inheritance, polymorphism, abstraction and encapsulation. OOPs decompose a problem into a number of entities called objects and then builds data and functions around these objects.
The software is divided into a number of small units called objects. The data and functions are built around these objects.
1. The data of the objects can be accessed only by the functions associated with that object.
2. The functions of one object can access the functions of another object.
Characteristics of “Object”:
State(what the object have), Behavior(what the object do), Identity(what makes it unique)
For example, a vehicle is an object.
Its states includes: Velocity, Moving direction, Fuel level etc.
Its behavior includes: Change speed, Change gear, Change direction, start/stop etc.
Its identity includes: Chassis Number, RC Number, Engine Number etc.