Docsity

Introduction to Object-Oriented Programming (OOP), Schemes and Mind Maps of Computer Programming

Partial preview of the text

Download Introduction to Object-Oriented Programming (OOP) and more Schemes and Mind Maps Computer Programming in PDF only on Docsity!

OOP

Introduction

Devya Nand

What is OOP?

  • (^) Object-Oriented Programming (OOP) is a programming paradigm that

organizes code by combining data and functions into objects

paradigm:

A programming paradigm is a fundamental style or approach used in programming

to writing code,shaping how developers design,organize and solve problems.

Major Paradigms:

  • Sequential
  • (^) Procedural
  • Object-Oriented

Procedural Programming Paradigm

Definition :

A paradigm based on the concept of procedure calls (functions).

Breaks down tasks into reusable procedures.

  • Example :

C programs using functions like printf(), scanf().

  • (^) Characteristics :

Focus on functions and procedures.

Stepwise refinement and modularity.

No object manipulation.

Object-Oriented Programming

Paradigm

Definition :

A paradigm that revolves around the concept of "objects" that

contain both data and methods.

Example : C++ program modeling real-world objects like a

"Book" class with attributes (author,genre) and methods

(addbook(),updatdebook()).

Difference between Procedual programming and

OOP

Focus

  • (^) Procedural programming focuses on functions and actions.
  • (^) OOP focuses on objects and their interactions.

Data Handling

  • (^) In procedural programming, data is manipulated globally.
  • (^) In OOP, data is encapsulated within objects, ensuring better security.

Code Reusability

  • (^) Procedural programming has limited code reusability.
  • (^) OOP promotes high reusability through concepts like inheritance and polymorphism.

Real-World Mapping

  • (^) Procedural programming is less intuitive in mapping real-world scenarios.
  • (^) OOP closely mirrors real-world entities and their behaviors.
  • (^) Procedural Programming: C, Pascal, Fortran.
  • (^) OOP: C++, Java, Python.

Thanks ๐Ÿ™‚