What Is Object-Oriented Programming? 4 Basic Concepts of OOP

OOP, basic concept of OOP, pillar of OOP, OOp in java, OOP in C+, Opp in C#

OBJECT-ORIENTED LANGUAGES

 C++
  • Most wide used
  •  Largest for instanceneer|engineer|applied scientist|technologist|computer user} base
 Java
  •  Lacks sure features, e.g. multiple inheritances, pointers, templates
  •  Less powerful than C++ (but additionally safe, of course)
 C#
  •  Rising

What's OBJECT-directed PROGRAMMING (OOP)

Object-oriented programming (OOP) could be a programming approach that
involves programming victimization objects...

OOP's Objects:
                                 The associate object represents an entity within the world that may be clearly identified. For example, for a student, a table may be viewed as an object. the associate object has a distinctive identity, state, and associated behaviors. The state of an object consists of a collection of knowledge fields (also referred to as properties) with their current values. The behavior of an object is outlined by a set of methodologies...
for example, a person is an object having a name, gender, and remuneration properties. we tend to
will calculate his annual salary by victimization method e.g. calculate salary()

Class / Category:

  • Objects belong to categories/class
  • A category/class and an object of that class have an equivalent relationship to a knowledge sort and a variable.
  • All objects with the same characteristics (data-associated functions) represent one class.
  • A category/class is a container, a blueprint or a template, or a sketch- of a variety of comparable things.
  • It just specifies what information and what functions are enclosed in objects of that class
  • For example, HUMAN could be a class, and Ahmad is its instance (object)
Object-Oriented Approach

The elemental plan is to mix/combine into one unit each data and functions that treat the data.
Such a unit is termed an “Object”.
  • It is associate object’s functions are called “member functions” in C++
  • It is associated with its information and is termed “ data members”.
  • An object’s data is usually accessed through its member operations, i.e. it's hidden from accidental alteration
  • Information and its function are aforesaid to be encapsulated into one entity
  • Information encapsulation and data activity are key components of object-oriented languages

Advantages of OOP / Importance of OOP:
  • Save development time (and cost) by reusing code
  • once an object category is made it may be utilized in alternative applications
  • Easier debugging
  • classes can be tested severally
  • reused objects have already been tested

PILLARS OF OOP

  • Encapsulation
  •  Abstraction
  •  Polymorphism
  •  Inheritance.
1. Encapsulation:
  • Also referred to as information activity
  • Only the object’s strategies will modify info within the object.
Encapsulation is the mechanism that binds along code and also the data it manipulates and keeps each safe from outside interference and misuse



2. Abstraction:
  • Focus solely on the necessary facts concerning the matter at hand
  • to design, produce, and describe so it may be simply used while not knowing the small print of how it works.
  • Used to represent the essential options without representing the background details
  • E.g. Mobile application shows you merely generalized reading while not going into implementation details

3. Polymorphism:
  • Poly suggests that “many” and morphism means “form”
  • the same word or phrase will mean factors|various things} in numerous contexts
  • Using operators or functions in different ways that reckoning on what they're operative on is termed polymorphism (lit. one thing with several distinct forms)
  • Overloading could be a special case of polymorphism, for example, +, -, /, << etc.
4. Inheritance:
  • Derive other (sub-)classes from an existing class
  • The original class is called the BASE CLASS; the others are DERIVED categories
  • Each class shares common characteristics with the category from that it had been derived, and might additionally add its own modifications, and additions.
  • For instance, VEHICLE is a class from which CAR, TRUCK, BUS, and MOTORCYCLE classes can be derived...







If You Have any Queries Regarding our Topic Then Contact Us Here! or via the Comment icon .....



............💖Thank You for Reading💖............

🎉  If you want to buy this document's PDF OR Any-File Click Here! (Service Currently Unavailable)