Page 23 - CA_Blue( J )_Class9
P. 23
Some advantages of polymorphism are as follows:
1. Code Reusability: Reduces duplication by allowing the same method to work with different types.
2. Simplified Code Management: Enables handling of multiple object types through a single interface.
3. Flexibility and Scalability: Easily extendable with new subclasses.
4. Improved Readability: Makes code cleaner and easier to understand.
Let’s Revisit
Computer Languages can be classified into three different languages: Machine-level Language, Assembly-Level
Language and High-Level Language.
Procedure-oriented programming and Object-oriented programming are two approaches of High-Level
languages.
The programming language that breaks down a programming assignment into a group of variables, data
structures and sub programs is called Procedure-oriented programming languages.
A programming model that depends on the theory of classes and objects, and focuses on data rather than
functions is known as Object-oriented programming.
FORTRAN, COBOL, BASIC are some of the POP languages and Java, C++, C#, Python are some commonly known
OOP languages.
Principles of OOPs are Data Abstraction, Inheritance, Polymorphism and Encapsulation.
The wrapping up of data members and Member functions together into a single unit is called Encapsulation.
Data Abstraction is the property by which the essential features are shown without knowing the background
details.
Inheritance is the method that allows one class to inherit the properties (data members and member functions)
of another class.
Polymorphism is a feature that allows objects to exhibit multiple forms or behaviours, depending on the context
in which they are used.
MIND DRILL
Solved Questions
A. Tick ( ) the correct answer.
1. A programmer needs a computer language to communicate with a ………………….
a. programmer b. computer
c. animal d. non-living thing
2. Which of the following is a user-friendly computer language?
a. Machine-Level language b. Assembly-Level Language
c. High-Level Language d. None of these
Principles of Object-Oriented Programming 21

