0% found this document useful (0 votes)
24 views

XII - Chapter 2 - Object Oriented Programming

OOPS

Uploaded by

nikchoudhury1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

XII - Chapter 2 - Object Oriented Programming

OOPS

Uploaded by

nikchoudhury1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1

Object Oriented Programming


Chapter 2

➤ Programming Paradigm:
A Programming Paradigm defines the methodology of designing and implementing programs using the key
features and building blocks of a programming language. It is a fundamental style or approach to writing
computer programs. It provides a set of principles, concepts, and techniques for designing, developing, and
maintaining software.

➤ Various Programming Paradigms:


Programming paradigms define the structure and organization of programs, as well as the ways in which
data is represented, manipulated, and stored. They also determine the flow of control and the way in which
software modules interact with each other.

➜ Procedural Programming
Procedural programming is a programming paradigm that involves breaking down a program into smaller,
sequential steps called procedures or functions. These procedures are designed to perform specific tasks,
and they can be called by other procedures or the main program. Procedural programming paradigm lays
more emphasis on procedure or the algorithm. Data is considered secondary. Data is loosely available to
many functions.
One of the key benefits of procedural programming is that it allows programmers to break down a
complex problem into smaller, more manageable tasks. By dividing the program into smaller procedures,
each with its own specific purpose, it becomes easier to understand and modify the program.
Examples of programming languages that support procedural programming include C, Pascal,
Fortran, and BASIC. However, many modern programming languages, including Python and Ruby, also
support procedural programming along with other programming paradigms.
Major limitations of procedural programming paradigm are :
2
(i) It is susceptible to increased time and cost overheads during design changes.
(ii) It leads to increased time and cost overheads during design changes.

➜ Object Oriented Programming (OOP)


Object-Oriented Programming (OOP) is a programming paradigm that focuses on the use of objects 1 to
represent and manipulate data. In OOP, programs are organized around objects, which are instances of
classes2 that contain both data (known as attributes or properties) and behavior (known as methods). The
main important characteristics of OOP are given below :
➧ Abstraction
➧ Encapsulation
➧ Inheritance
➧ Polymorphism
➧ Modularity

➧ Abstraction : Abstraction is a fundamental concept in Object-Oriented Programming (OOP) that


refers to the process of hiding complexity and showing only the essential features of an object to the
outside world. This can help to reduce complexity and make code more modular and maintainable.

➧ Encapsulation: Encapsulation is a fundamental concept in Object-Oriented Programming (OOP) that


refers to the practice of bundling data and methods together into a single unit, and controlling access to that
unit from the outside world.

➧ Inheritance: Inheritance is a fundamental concept in Object-Oriented Programming (OOP) that allows


one class to inherit the properties and methods of another class. The class that is being inherited from is
known as the superclass or parent class, and the class that is inheriting the properties and methods is
known as the subclass or child class.

➧ Polymorphism: Polymorphism is a fundamental concept in Object-Oriented Programming (OOP) that


allows objects to take on many forms, or to be used in different ways, depending on the context in which
they are being used.

➧ Modularity: Modularity in OOP refers to the practice of breaking down a complex system into smaller,
self-contained modules, each with its own set of responsibilities and functions. Each module is designed to
be independent of the other modules, but can still interact with them through well-defined interfaces.

1 Object: An Object is an identifiable entity with some characteristics and behavior


2 Class: A Class is a group of objects that share common properties and relationships.

You might also like