Elementary Concepts OF Objects and Classes
Elementary Concepts OF Objects and Classes
An Object Oriented Programming(OOP) Language not only promotes features like data abstraction,
Encapsulation, inheritance and Polymorphism but it also correlates two more basic units (i.e. Objects
and Classes).
In this Presentation we will discuss the features and properties of objects and classes applicable to real
world as well as to software world.
OBJECTS:
An object is a fundamental unit of Object Oriented Programming(OOP) and represents real life entities
Objects are of Two types in Java Programming:
Software Objects
Real world objects:
Real World Objects are the objects which we experience or use in our everyday life.
We can identify an Object for a Real World Object by the following features:
■ Model
■ Dial Pad
■ App
■ It is used to talk
A Software may be defined as an object that is created while writing a Java Program.
The characteristics and behaviors of real world objects are referred to as data members and member
functions(methods) of software objects respectively.
REAL WORLD OBJECTS VS SOFTWARE OBJECTS
The states or characteristics of the real world objects are considered to be data members in the software
objects
The behavior in the real world objects are referred to as the functions or methods in the software objects.
Class:
As we have learnt earlier an object is a unique entity possessing some characteristics and behavior. Now,
you might be thinking that from where these characteristics and behavior are embedded in an object.
This is done with the help of a Class. A class can be defined as a blueprint or template for its objects.
It can also be defined as a category that describes some characteristics and the behavior. Each Object of
a class possesses the characteristics and the behavior(data and functions) described within the class.
In this way ‘Class’ and its ‘objects’ have a close relationship in an Object Oriented Programming
System.
For Example: If we define a class called ‘fruits’, then it may describe the color, taste and shape as
characteristics and used for making juice, used for festive occasions and used for breakfast as behaviors.
Creating objects of a class