Abstraction and Encapsulation | OOPs in C++ | Lec-3 | Bhanu Priya

preview_player
Показать описание
This video explains abstraction & encapsulation of oops concept in detailed
Рекомендации по теме
Комментарии
Автор

Abstraction :hiding un necessary details.. Eg: TV... To watch TV, we need only display and remote... We don't want the inner parts
Encapsulation : hiding data for protection
Eg: encrypted Msg... The message is encrypted to avoid reading by someone else

benazeershajahan.p.t
Автор

Thanks. Abstraction: purpose is hiding complexity.eg. Abstract keyword.

Encapsulation: We use it for protecting data and can achieve using access modifier s eg. Private, internal etc.

mohdaasif
Автор

Abstraction means showing necessary things whereas. Encapsulation is like a wrapper which wraps the methods and datamembers. 👍

adarshvaranasi
Автор

To be honest.. you need to work on example sets before using them. Example could be more simplified and explained

sarveshkaran
Автор

the way you are explaining with daily life examples is really helpful to you, , maam

hassanmahammad
Автор

Example of Encapsulation...

In your house, you're the owner or the person who lives there, so in your house you can do anything and see anything without anyone's permission, but if a stranger or the person who doesn't live in your house, he/she has to take permission from you to see and do anything in your house, its same as what Encapsulation does, it protects the private data

phoenixalcander
Автор

useful explanation thank you for making and sharing this video
i'm following your channel from Afghanistan

faisalbehzad
Автор

Just a correction and modification of some concepts

Abstraction is not that concept of showing or providing only the important things and hiding all unnecessary or complex details from the user (the programmer), as everyone thinks

You kindly explained that Abstraction is to provide only what the user can get, in short, to provide only the Important points in the classes that will be instanciated using an Object, and this is unfortunately wrong....

And if it was actually in this sense, the name would have been Only-Important-members or Hidding Data and so on...

In short, your concept is part of the definition of Encapsulation and not Abstraction, and it is very close to the concept of inheritance more than Encapsulation

Linguistically:

Abstraction means intangible or imaginary or virtual or the opposite of Concrete which means tangible, real or active

Programmatically:

It specifically means the Class and the Interface (interface is not available in all programming languages). The important thing is the Class in itself.

And any Class in OOP is considered as a Template, Model, or Map of something in Reality. That thing may be real or imaginary, and as it may be tangible or intangible, it does not matter the Projection and how .... but it matters The Classes that will Ultimately Express an Entity, Component, or Object that we will deal with later....

So Abstraction in OOP will be like that:

Modeling the Real World. and No more than this Definition ..


There are also inactive, intangible, or Abstract Classes that we call them Class Model, and they are somewhat similar to the Interface.

This type has a directive of type Abstract and it does not accept instanciate with Objects, that is, it has no Objects to represent it (No Instances).

And her task is Only to make a Model or Template for her children's that inherited from and finally can share members from base Abstract Classe.

And this technique is also within the definition of the corner Abstraction

And my concept here is in modeling and not in the role of the abstract class (because its role in terms of providing only what the sons classes can share as members and this is a part from the corner of inheritance)

finally :

Abstract classes is an Abstract Model for a Concrete classes Where this concrete will be a Models for some objects in our Real World...

Interfaces are also a Model or Abstract that Classes use them in-order to benefit from those members in that Interface..

So, Abstraction OOP is only about these three things in C Sharp, Java and Delphi and maybe C++ builder(because all of them have Interface as far as I know now)

As for the definition that you explained in the video, it is related to Encapsulation and Inheritance rules and not Abstraction at All ..

Abstraction is the first Step Rule of OOP Pillars wich is the Classes and Interfaces ...
Abstraction is not more than a Modelling ...

And thank you for your understanding ...

MBen_Delphi
Автор

The only videos longer than 10 minutes I have ever watched on youtube are those of Sadhguru Jaggi Vasudev. I could never concentrate for more than 5 minutes on tutorial videos - but this is great - I watched the entire video in one stretch!

santhoshnair
Автор

very helpful tutorial mam, thanks a lot 👍👍👍🙂🙂🙂🙂

SmartProgramming
Автор

Really Great i have no words to say even i now already but now i can make anyone understand thanks you very much mam. May you always be lucky.

shahidhussain
Автор

hi mam, i appreciate your effort good video, actually i need to know exact difference between abstraction and encapsulation. for abstraction you said databae as example and for encapsulation you took car, both are same it's showing the future to the world and hiding its implementation. so what is the difference

hameed
Автор

mrs.Bhanu Priya you should have explained it with a C++ Program for better understanding.

molyoxide
Автор

Nice mam I salute you the way of teaching

saqibbhat
Автор

Great explanation, thanks for your efforts. I honestly see the last example for encapsulation to be abstraction. You're literally hiding the unnecessary details and showing the essential features, or am I wrong? thanks again

fireflies
Автор

I don't have the word to say 💞💞💞💞

priyankabansode
Автор

I did not get the advantage of Encapsulation. You said that we can not set the value of variable since it is private but we can set the value with setter method, then where is the advantage?

ILuvBilli
Автор

Mam first your write definitions and then explain please mam

nagendarchillamcharla
Автор

Key abstraction and mechanism sole thaga mam

Jayamalinikumar
Автор

Youtube should have 5x playback speed option

hirenbhesaniya