Unit 5: Object Oriented Programming Class 12 Computer Notes | Based On New Syllabus

Object Oriented Programming (OOP)

Object Oriented Programming (OOP)

OOP

Characteristics of OOP

  1. Emphasis is on data rather than procedure.
  2. Programs are divided into objects.
  3. Data structures are designed such that they characterize the objects.
  4. Functions that operate on the data of an object are tied together in the data structure.
  5. Data is hidden and cannot be accessed by external functions.
  6. Objects may communicate with each other through functions.
  7. New data and functions can be easily added whenever necessary.
  8. Bottom-up approach is followed in program design.

Advantages of OOP:

  1. We can eliminate redundant codes by using inheritance feature of OOP.
  2. It is very easy for managing complex and large size problems.
  3. The most important is the reusability of codes by using the features inheritance.
  4. It takes very less time for the development and maintaining the software.
  5. It is efficient for testing and implementation of the system.
  6. It follows a bottom-up approach.
  7. It can be implemented in the field of OODBMS, OOAD, and different fields of engineering.

Disadvantage of OOP:

  1. Size: Object-oriented programs are much larger than other programs.
  2. Effort: Object-oriented programs require a lot of work to create.
  3. Speed: Object-oriented programs are slower than other programs.

Features of OOP:

  1. Object

  2. In OOP, everything revolves around objects. An object is a self-contained unit that represents a real-world entity or concept. It combines data (attributes) and behaviors (methods or functions) related to that entity.

  3. Class

  4. A class is a blueprint or template for creating objects. It defines the common structure and behavior that its objects will possess. Think of it as a set of instructions for building objects.

  5. Data Abstraction

  6. Data abstraction is the process of simplifying complex reality by modeling classes based on their essential attributes and behaviors while hiding unnecessary details. It allows you to focus on what an object does rather than how it does it.

  7. Encapsulation

  8. Encapsulation is the concept of bundling an object's data (attributes) and methods (functions) into a single unit, called a class. It also involves restricting access to certain parts of an object, ensuring that data can only be accessed and modified through well-defined methods.

  9. Inheritance

  10. Inheritance is a mechanism that allows you to create a new class (derived or child class) based on an existing class (base or parent class). The derived class inherits the attributes and behaviors of the base class and can extend or override them.

  11. Polymorphism

  12. Polymorphism means "many shapes" and refers to the ability of objects of different classes to respond to the same method or function call in a way that is appropriate for their specific class.

  13. Message Passing

  14. In OOP, objects communicate by sending messages to each other. This is often accomplished through method calls. When an object needs to perform a specific action or request information from another object, it sends a message, and the recipient object responds accordingly.

  15. Modularity

  16. OOP promotes modularity by breaking down a large system into smaller, manageable pieces (objects or classes). Each module (object) focuses on a specific aspect of the system's functionality.

  17. Reusability

  18. OOP emphasizes code reusability through the use of classes and inheritance. Once you've created a well-designed class, you can create multiple instances of it (objects) and reuse that class in different parts of your program or even in different projects.

  19. Flexibility and Scalability

  20. OOP provides a flexible framework for building software. As the requirements of a system evolve, you can extend existing classes or create new ones without affecting the rest of the codebase.

Difference Between OOP and POP

OOP POP
It stands for Object Oriented Programming. It stands for Structure Oriented Programming.
Program is divided into objects. Program is divided into functions.
Bottom-up approach. Top-down approach.
Inheritance property is used. Inheritance is not allowed.
It uses access specifier. It doesn't use access specifier.
Encapsulation is used to hide the data. No data hiding.
Concept of virtual function. No virtual function.
EXAMPLE: C++, Java. EXAMPLE: C, Pascal.

Getting Info...

Post a Comment

Please do not enter any spam link in the comment box.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.