The four basic principles of object-oriented programming (c#)

Posted by jineesh uvantavida on Monday, June 7, 2021 Under: c#
  •  Abstraction 
    1. Abstraction is "To represent the essential feature without representing the background details."
    2. Abstraction lets you focus on what the object does instead of how it does it.
    3. Abstraction provides you a generalized view of your classes or objects by providing relevant information
    4. Abstraction is the process of hiding the working style of an object, and showing the information of an object in an understandable manner.
  • Encapsulation 
    1. Hiding the internal state and functionality of an object and only allowing access through a public set of functions.
    2. Wrapping up a data member and a method together into a single unit (in other words class)
    3. hiding the internal details of an object, in other words how an object does something.
    4.  technique used to protect the information in an object from another object.
    5.  Hide the data for security such as making the variables private, and expose the property to access the private data that will be public. 

  • Inheritance 
    1. Ability to create new abstractions based on existing abstractions.
    2. When a class includes a property of another class it is known as inheritance.
    3.  Inheritance is a process of object reusability

  • Polymorphism 
    1. Ability to implement inherited properties or methods in different ways across multiple abstractions.
    2.  Polymorphism means one name, many forms.
    3.  Many forms of a single object is called Polymorphism.
Summary
  • "Encapsulation is accomplished using classes. Keeping data and methods that access that data into a single unit."

  • "Abstraction is accomplished using an Interface. Just giving the abstract information about what it can do without specifying the details."

  • "Information/Data hiding is accomplished using modifiers by keeping the instance variables private or protected."

In : c# 


Tags: the four basic principles of object-oriented programming (c#) 

Translate This Page

 


Make a free website with Yola