0% found this document useful (0 votes)
9 views5 pages

Dasdsad

The document discusses the importance of encapsulation, polymorphism, and inheritance in object-oriented programming (OOP), highlighting their roles in structuring data and methods. It also examines the suitability of OOP for graphical applications, noting its strengths such as reusability and modularity, alongside weaknesses like a steep learning curve and complexity. Ultimately, the document emphasizes the need for developers to consider both the advantages and disadvantages of OOP when choosing a programming paradigm.

Uploaded by

oakarhtet2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Dasdsad

The document discusses the importance of encapsulation, polymorphism, and inheritance in object-oriented programming (OOP), highlighting their roles in structuring data and methods. It also examines the suitability of OOP for graphical applications, noting its strengths such as reusability and modularity, alongside weaknesses like a steep learning curve and complexity. Ultimately, the document emphasizes the need for developers to consider both the advantages and disadvantages of OOP when choosing a programming paradigm.

Uploaded by

oakarhtet2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Theory of Object Oriented

Programming

Oakar Htet

Date
9,16,2023
Course title
Object Oriented
Programming
Table of Contents
Importance of encapsulation, polymorphism and inheritance on object-oriented
programming......................................................................................................................3
Encapsulation..................................................................................................................3
Polymorphism.................................................................................................................3
Inheritance......................................................................................................................3
Suitability of object-oriented programs for graphical applications...................................4

Object Oriented Programming PAGE 2


Importance of encapsulation, polymorphism
and inheritance on object-oriented
programming

Encapsulation
In object-oriented programming (OOP), encapsulation is the practice of bundling
related data into a structured unit, along with the methods used to work with that data.
Most OOP languages implement encapsulation primarily through classes and the
objects instantiated through those classes. A class defines a set of attributes for the
data and the methods used to carry out operations related to the data. (Sheldon, 2023)

Polymorphism
Polymorphism is one of the core concepts of object-oriented programming (OOP) that
describes situations in which something occurs in several different forms. In computer
science, polymorphism describes the concept that you can access objects of different
types through the same interface. Each type can provide its own independent
implementation of this interface.

You can perform a simple test to know whether an object is polymorphic. If the object
successfully passes multiple is-a or instance of tests, it’s polymorphic. (Thorben, 2021)

Inheritance
Inheritance refers to the assets that an individual bequeaths to their loved ones after
they pass away. An inheritance may contain cash, investments such as stocks or bonds,
and other assets such as jewelry, automobiles, art, antiques, and real estate.
(BLOOMENTHAL, 2022)

Object Oriented Programming PAGE 3


Suitability of object-oriented programs for
graphical applications.
Object-oriented programming (OOP) is a programming paradigm that is based on the
concept of objects, which can contain data and code that manipulates that data. OOP
has become a popular way of developing software because it allows programmers to
write code that is easier to maintain and modify.

The Strengths and Weaknesses of OOP are:

 Strengths of OOP:

1. Reusability: OOP allows developers to create code that can be reused in different
parts of an application. This makes development faster and more efficient because
developers do not have to write new code from scratch each time they need to
create a new feature.

2. Modularity: OOP allows developers to break down complex systems into smaller,
more manageable modules. This makes it easier to develop, test, and maintain
code because changes made to one module do not affect other parts of the
system.

3. Encapsulation: OOP allows developers to hide the implementation details of


objects, making it easier to change the behavior of an object without affecting
other parts of the system. This also improves security by limiting access to
sensitive data.

4. Inheritance: OOP allows developers to create new classes by inheriting


characteristics from existing classes. This reduces the amount of code that needs
to be written and makes it easier to maintain the codebase.

5. The principle of data hiding helps the programmer to build secure programs
which cannot be invaded by the code in other parts of the program.

6. It is very easy to partition the work in a project based on objects.

7. The new technology promises greater programmer productivity, better quality of


software and lesser maintenance cost.

Object Oriented Programming PAGE 4


 Weaknesses of OOP:

1. Steep Learning Curve: OOP is a complex paradigm, and it can take time for
developers to become proficient in it. The concepts of inheritance, polymorphism,
and encapsulation can be difficult to understand for beginners.

2. Overhead: OOP code can be more verbose than code written in other paradigms,
which can result in slower performance. Additionally, OOP often requires more
memory and processing power than other paradigms.

3. Complexity: OOP can lead to complex code, especially when dealing with large
systems that have many interdependent objects. This complexity can make it
more difficult to debug and maintain code.

4. Limited Reusability: Although OOP allows for code reusability, it can also lead to
tightly coupled code that is difficult to reuse in other contexts. This can make it
challenging to maintain the codebase in the long run.

5. The length of the programmes developed using OOP language is much larger than
the procedural approach. Since the programme becomes larger in size, it requires
more time to be executed that leads to slower execution of the programme.

6. OOPs take time to get used to it. The thought process involved in object-oriented
programming may not be natural for some people.

The Strengths And Weaknesses Of OOP:- Conclusion

In conclusion, OOP has several advantages and disadvantages. The advantages of OOP
include reusability, modularity, encapsulation, and inheritance. These features make it
easier to develop, test, and maintain code. However, OOP also has some disadvantages,
including a steep learning curve, overhead, complexity, and limited reusability. As with
any programming paradigm, developers must weigh the pros and cons of OOP when
deciding whether to use it for a particular project. (Mandl, 2023)

Object Oriented Programming PAGE 5

You might also like