Posted by jineesh uvantavida on Monday, June 7, 2021
Under: c#
- Abstraction is "To represent the essential feature without representing the background details."
- Abstraction lets you focus on what the object does instead of how it does it.
- Abstraction provides you a generalized view of your classes or objects by providing relevant information
- Abstraction is the process of hiding the working style of an object, and showing the information of an object in an understandable manner.
- Encapsulation
- Hiding the internal state and functionality of an object and only allowing access through a public set of functions.
- Wrapping up a data member and a method together into a single unit (in other words class)
- hiding the internal details of an object, in other words how an object does something.
- technique used to protect the information in an object from another object.
- 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
- Ability to create new abstractions based on existing abstractions.
- When a class includes a property of another class it is known as inheritance.
- Inheritance is a process of object reusability
- Polymorphism
- Ability to implement inherited properties or methods in different ways across multiple abstractions.
- Polymorphism means one name, many forms.
- 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#)