Page 19 - CA_Blue( J )_Class10
P. 19
In object-oriented programming, polymorphism
is the feature of being able to allot a different
meaning to a variable, a method or an object so
that they can have more than one form. Thus, it is
the ability to use an operator or method in
different ways.
Polymorphism allows multiple objects of different
subclasses to be treated as objects of a single
superclass, while automatically selecting the
proper methods to apply to a particular object
based on the subclass it belongs to.
1.5 DEFINITIONS RELATED TO THE CHAPTER
A programming language is a formal language comprising a set of instructions that produce various kinds of output.
It allows humans to communicate with computers by providing a means for writing algorithms and expressing
computations in a format that can be executed by a computer. Programming languages come in various types, including
high-level languages like Python, Java, and C++, as well as low-level languages like assembly language.
• Program: program is a set of instructions or code written to perform a specific task when executed by a computer.
It can range from simple scripts to complex software applications designed to fulfill various functions.
• Programming: Programming is the process of designing, writing, testing, and maintaining code to create
instructions that computers can follow to perform specific tasks or achieve desired outcomes. It involves using
programming languages to communicate with computers and develop software applications.
• Programmer: A programmer is a person who writes, tests, and maintains code to create software programs or
applications. Programmers use programming languages to instruct computers on how to perform specific tasks or
functions.
• Encapsulation: Encapsulation is a fundamental concept in object-oriented programming where data (attributes)
and methods (functions) that operate on that data are bundled together within a class. It allows for data hiding,
protecting the internal state of an object and only allowing access through designated methods, enhancing security
and modularity in software design.
• Data abstraction: Data Abstraction is a concept in programming that enables the creation of complex data types
where only relevant information and functionalities are exposed, while implementation details are hidden. It allows
developers to work at higher levels of abstraction, focusing on what an object does rather than how it achieves it,
promoting code simplicity and reusability.
Note: Encapsulation and Abstraction are closely related concepts in object-oriented programming, with
encapsulation providing the mechanism for implementing abstraction effectively. Encapsulation hides the
internal complexities of an object and provides controlled access to its functionality, while abstraction
allows developers to define simplified views of objects based on their essential characteristics. Together,
encapsulation and abstraction promote modular, maintainable, and understandable software design.
• Inheritance: Inheritance is a fundamental OOP concept where a class (subclass) can inherit attributes and
methods from another class (superclass). This allows for code reuse, extensibility, and the creation of hierarchical
relationships among classes, enabling subclasses to inherit and potentially override or extend the behaviour of
their parent classes.
17
Introduction to Object-Oriented Programming Concepts 17

