Page 306 - CITS - Computer Software Application -TT
P. 306
COMPUTER SOFTWARE APPLICATION - CITS
Object
Any entity that has state and behaviour is known as an object. For example, a chair, pen, table, keyboard, bike,
etc. It can be physical or logical.
An Object can be defined as an instance of a class. An object contains an address and takes up some space in
memory. Objects can communicate without knowing the details of each other’s data or code. The only necessary
thing is the type of message accepted and the type of response returned by the objects.
Class
A class can be considered as a blueprint using which you can create as many objects as you like. The class is a
group of similar entities. It is only a logical component and not a physical entity. For example, if you had a class
called “Expensive Cars” it could have objects like Mercedes, BMW, Toyota, etc.
Inheritance
Inheritance is an OOPS concept in which one object acquires the properties and behaviours of the parent object.
It’s creating a parent-child relationship between two classes. It offers a robust and natural mechanism for organising
and structuring any software. It provides code reusability. It is used to achieve runtime polymorphism. For
example, let’s say we have an Employee class. Employee class has all common attributes and methods which
all employees must have within the organisation. There can be other specialised employees as well e.g. Manager.
Managers are regular employees of the organisation but, additionally, they have few more attributes over other
employees e.g. they have reports or subordinates.
Polymorphism
It refers to the ability of object-oriented programming languages to differentiate between entities with the same
name efficiently. This is done by Java with the help of the signature and declaration of these entities. The ability
to appear in many forms is called polymorphism.
Abstraction
Abstraction means showing only the relevant details to the end-user and hiding the irrelevant features that serve
as a distraction. For example, during an ATM operation, we only answer a series of questions to process the
transaction without any knowledge about what happens in the background between the bank and the ATM.
Encapsulation
Binding (or wrapping) code and data together into a single unit are known as encapsulation. For example, a
capsule, it is wrapped with different medicines.
293
CITS : IT&ITES - Computer Software Application - Lesson 78 - 84
78