Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Object-Oriented Programming (OOP): OOP is a programming paradigm that revolves around the concept of "objects." These objects are instances of classes, which act as blueprints for creating objects. Objects can encapsulate data (attributes or properties) and the methods (functions) that operate on that data. OOP aims to model real-world entities by representing them as objects with defined behaviors.

Key Concepts:

  1. Class:

    • A class is a blueprint or template that defines the structure and behavior of objects.
    • It encapsulates data and methods that operate on the data.
    • Objects are instances of a class.
  2. Object:

    • An object is an instance of a class, created based on the class's blueprint.
    • Objects have attributes (data) and methods (functions) associated with them.

Advantages of OOP:

  1. Modularity:

    • OOP promotes modularity by breaking down a program into smaller, self-contained objects.
    • Each object represents a specific part of the system, making it easier to understand and maintain.
  2. Reusability:

    • Objects and classes can be reused in different parts of a program or in different programs.
    • This reduces redundancy and promotes code reuse.
  3. Encapsulation:

    • Encapsulation involves bundling data and methods that operate on the data within a single unit (an object).
    • It hides the internal details of an object, providing a clean interface for interaction.
  4. Abstraction:

    • Abstraction allows developers to focus on essential features while hiding unnecessary details.
    • Classes provide a level of abstraction, making it easier to work with complex systems.
  5. Inheritance:

    • Inheritance allows a new class (subclass/derived class) to inherit attributes and methods from an existing class (base class/parent class).
    • It promotes code reuse and facilitates the creation of hierarchical class structures.
  6. Polymorphism:

    • Polymorphism allows objects to be treated as instances of their parent class, providing a unified interface.
    • It enables flexibility in code, as objects can be used interchangeably.

    Advantage in OOP

  • Combination of Noun, Adjective and Verb
  • A Capsule that can Encapsule Data and
  • Has some privet and Public Properties
  • Has some function which is called Methods
  • Is a custom data type
  • A Isolated Environment for Properties and Methods

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages