C++ OOP - What is encapsulation in programming?

Поделиться
HTML-код
  • Опубликовано: 16 авг 2020
  • Encapsulation is one of the most important characteristics of Object-Oriented Programming. Encapsulation helps in data hiding and is used to prevent direct access to data. In order to access that data, public methods are exposed, and the user can change and access private members of the class only by using those public methods.
    📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.
    Download Visual Assist here: bit.ly/WT-CB
    I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
    Download Ultra Edit here: bit.ly/UE-CB
    It is a powerful, secure text editor designed specifically for programmers.
    ☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. You can use the link below to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
    However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
    Common question:
    Why should we use encapsulation when it is much easier to access and change properties if we don't?
    The answer is because we don't want to allow other developers to change and access everything they want, but we want to expose only properties that they should be able to see and change, and they can use them only if they obey the rules that we define. In that way, our data stays safe from outside misuse, because if you allow someone to have full permissions and do whatever he/she wants, it's just a matter of time when that person will wander off the intended way of building that system, create some complex overkill logic that is hard to understand, make things very dependent on one another, write duplicated code, etc.
    So there are many benefits related to encapsulation: easier to maintain the code, hides the data, easier to test, reusable...
    Let me give you one simple example of an application that can be used only by people that are 18+ years old. When the user registers, he enters his age, and there you have to check if his age is greater than 18.
    If it is, he should be able to use the app, but if it is not, throw him an error.
    Imagine also that the mentioned application has the option to edit user data. That means that the user can change his age after registration as well, so you would have to check again if age greater than 18 and behave accordingly, so writing the same code once more.
    And then, if all of a sudden someone decides that the app will be for people who are 21+ only, you have two places where you need to make that change. (This is a simple example, changing 18 with 21 is easy, and having two places where you need to do that is easy, imagine having some complex logic that you need to change in 20 places)
    What you can do instead is you can do the "age greater than 18" logic in the setter, and save the user's age if he is older than 18, and then write an error is he is not. That way each time that you want to set a value for the Age property, the same logic is executed, and each time that you have to change something, you do that in one place only.
    C++ Object-Oriented Programming playlist:
    • C++ OOP - Introduction... - Introduction to OOP
    • C++ OOP (2020) - What ... - Constructors and class methods
    C++ for beginners course: • C++ FOR BEGINNERS (202...
    C++ functions course:
    • C++ FUNCTIONS (2020) -...
    Follow me on other platforms:
    Instagram 📸 - / truecodebeauty
    Twitter 🐦- / truecodebeauty
    ******Initial code is available on TrueCodeBeauty Git******
    github.com/TrueCodeBeauty/Enc...
  • НаукаНаука

Комментарии • 234

  • @CodeBeauty
    @CodeBeauty  2 года назад +19

    📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.

  • @suyashmisra7406
    @suyashmisra7406 3 года назад +32

    i've tried to learn oop concepts from half a dozen sources .
    this is by far the most practical example i've seen .
    thank you,and keep up the good work!

  • @mistersir3185
    @mistersir3185 3 года назад +24

    I love how you're all business. Your videos are straight to the point with no BS. Thank you for being here on RUclips.

  • @bolow
    @bolow 2 года назад +6

    Thanks for keeping it simple, please keep these videos coming.

  • @azadr
    @azadr 2 года назад

    Started with oop concepts, I got stucked & then these explanation on c++ oop help me a lot
    - thanks a lot 😊

  • @theKuntalPaul.
    @theKuntalPaul. 3 года назад +29

    I started watching the OOP playlist as a part of my preparation process with the constructor video and I must say your explanations are very precise and to the point. Instead of dumping out every piece of information, you walk us through the concepts with a possible realistic scenario. Hope to see more content from your side. ❤

    • @lhaellor
      @lhaellor 2 года назад +1

      She should actually be my tutor in the university rather than these boring tutors that work just for money and just want to finish work.

    • @kevin_mitchell
      @kevin_mitchell 6 месяцев назад

      Some tutorials from other sources make the program example they use very complex with hundreds of lines of code with advanced concepts unrelated to the topic they're explaining, making it extremely difficult to follow along with and code it themselves to see how it works. It seems like they are trying to impress other advanced programmers with their coding skills rather than educate their students.

    • @nirbhaykumarchaubey8777
      @nirbhaykumarchaubey8777 3 месяца назад

      I too learnt constructors from her

  • @russelyg1803
    @russelyg1803 2 года назад +3

    Preparing for an exam tomorrow. 🥴
    Crash course!! Really helpful, the playlist. Thanks for awesome Content!

  • @bryanwere8701
    @bryanwere8701 3 года назад +1

    from kenya i have never subscribed to any youtube chanell and this is the first one dear, Thanks alot, i have been looking for some one with good explanation like yours

  • @rameshwarprasad4722
    @rameshwarprasad4722 3 года назад +25

    Amazing,clear and to the point explanation with a very relatable example. Keep up the good work.👍

    • @CodeBeauty
      @CodeBeauty  3 года назад +10

      Thanks. 😊
      I wanted to use something different from the examples that are usually used because there are a lot of those on the internet, so this came to mind. I'm glad that it's clear and understandable.

    • @rameshwarprasad4722
      @rameshwarprasad4722 3 года назад +1

      @@CodeBeauty Being a supporter and beneficiary of your content and knowledge I would like to praise you for choosing to teach C++ because C++ is one of those tools that have immense power but people avoid it because it requires deeper understanding. I surely believe that every fundamental topic related to memory , cpu and all that power c++ has we will be able to witness it on this channel with your kind efforts. Consider it just a mere suggestion. And thanks for the videos.👍🙏

  • @SHIVAMSHUKLA-be7zj
    @SHIVAMSHUKLA-be7zj 2 года назад +1

    by far the best definition ... thank you

  • @imSky69
    @imSky69 9 месяцев назад

    this playlis is really helpfull to me , i wanted to thank you so much because of the effort that you made , keep shining up lady

  • @dukujohnkenyi6688
    @dukujohnkenyi6688 2 года назад +1

    hello Saldina this is John from freecode camp and i love the effort thanls for sharing

  • @sebgoesgaming2807
    @sebgoesgaming2807 3 года назад +2

    Thanks! I think it would be a good idea if you add chapter markers in the progress bar

  • @monoman4083
    @monoman4083 3 года назад +4

    Hope you get to 10k+ subs very, very soon.

  • @tawansiforlifetfl9987
    @tawansiforlifetfl9987 3 года назад +8

    Thank you so much for your videos and your time.
    I have been studying OOP for this semester and I did not understand a word from my Professors.
    Your OOP Course on Free Code Camp Yt Channel has helped me a lot plus I am a subscriber to your channel and watched the Html and css playlist and C++ for beginners.
    You are a great tutor.
    PS Note:
    Try to keep your smile in every video because it is very nice.

  • @Progged
    @Progged 9 месяцев назад +5

    so inside the class under the public access modifier :
    void setName(string name) {
    Name = name;
    }
    string getName() {
    return Name;
    }

  • @vivekanand5900
    @vivekanand5900 3 года назад +4

    The way you explaining I started falling in love with coding..😇❤️

    • @haroldthibault9921
      @haroldthibault9921 2 года назад +1

      don't be fool !
      be aware that Beauty is really ...a beauty.
      She has aesthetic physical attributes !
      You might have fallen in love with the teacher instead, which is good, anyway, to increase the learning slope !

  • @clasherboytanjim5576
    @clasherboytanjim5576 10 месяцев назад

    I just love u and your smooth explanation ❤❤

  • @venkatmancha
    @venkatmancha 3 года назад +1

    Clear n awesome lecture...

  • @legolas5684
    @legolas5684 3 года назад +10

    Keep going!

  • @ahmadalr1990
    @ahmadalr1990 4 месяца назад

    you're amazing in the way you guide us step by step,, thanks a lot Selina

  • @tumusiimebrian3745
    @tumusiimebrian3745 3 года назад

    Thank you so much Saldina... keep going.... waiting for videos on Vectors🙏🙏🙏pliiiiiiiiiiz🛐

  • @user-nx5hu8xe6d
    @user-nx5hu8xe6d 3 месяца назад

    Your videos are awesome! Very helpful.

  • @nigahzahra6402
    @nigahzahra6402 3 года назад

    Great work mam, Please make vedio on object relationships: association, aggregation and composition.

  • @felicytatomaszewska2934
    @felicytatomaszewska2934 2 года назад +2

    She is the most beautiful coding teacher

  • @kayracan3663
    @kayracan3663 3 года назад

    You both teach us code and show us beuty i love you for that

  • @engineering6217
    @engineering6217 Год назад

    you are the best teacher...love from india.

  • @riadchebitou7459
    @riadchebitou7459 Год назад

    You're so talented keep the good work

  • @leonardopantoja7121
    @leonardopantoja7121 Месяц назад

    Me gusto el video, hasta el momento voy entendiendo. Gracias.

  • @diana_dev
    @diana_dev 2 года назад

    Your videos are amazing!

  • @infiniteone783
    @infiniteone783 3 года назад +16

    The more I watch, the more I realize C++ is a lot like Java, or at least the basics seem to be.
    Getter & Setter
    string getName() {
    return Name;
    }
    void setName(string name) {
    Name = name;
    }

    • @CodeBeauty
      @CodeBeauty  3 года назад +8

      C++ is a very powerful language, and it has strongly influenced many other languages, among them is Java. Because of that, there are a lot of similarities between them. But you can find some important differences as well, especially if you dive deep into both of those languages.
      Yep, that is the example of setter and getter! 😊

    • @tanyatyagi3649
      @tanyatyagi3649 4 месяца назад

      Thankssss

  • @MissChelsie24
    @MissChelsie24 3 года назад

    Very helpful!

  • @mahmoudyosry9409
    @mahmoudyosry9409 3 года назад +1

    thank you for that , i found your channel by coincidence and i found you are a great instructor that provides a clear explanation , i like the way you provide an example, keep going.
    can you explain move constructor , copy constructor , move assignment , copy assignment in next videos??

    • @CodeBeauty
      @CodeBeauty  3 года назад +2

      Thanks a lot! Some of those topics are already on my TODO list! 🤓

  • @Vovastrugac
    @Vovastrugac 3 года назад +1

    Big thanks for your work !

  • @RC-hi5sj
    @RC-hi5sj 3 года назад

    I learned a lot thanks

  • @sarahabdelaziz179
    @sarahabdelaziz179 Год назад

    Thanks for you effort.🙂

  • @georgeemmanuel3155
    @georgeemmanuel3155 2 года назад +3

    Hi! Saldina, please will you show me the different between Abstraction and Encapsulation. these two principles are always confusing me, please I need your assistant. Thank you!

  • @ephraimokoriko2926
    @ephraimokoriko2926 2 года назад +1

    I really wish I got to know about your videos two years ago

  • @dev.antunes
    @dev.antunes 3 года назад +2

    Obrigado, Saldina! =)

  • @hafizmuhamad5966
    @hafizmuhamad5966 3 года назад

    very clear explanation, im from malaysia

  • @gourikirti5100
    @gourikirti5100 10 месяцев назад

    Amazing work

  • @builder6189
    @builder6189 3 года назад +1

    Keep Rocking !

  • @salmanahmadsultanmohammad1231
    @salmanahmadsultanmohammad1231 3 года назад +3

    What is the difference between encapsulation and abstraction ?

  • @Hiracreationalz
    @Hiracreationalz 5 месяцев назад +1

    Thank you so muvh for these videos

  • @mufindmakaya4516
    @mufindmakaya4516 3 года назад

    so amazing your videos

  • @roscamarius8896
    @roscamarius8896 3 года назад

    Thank you!

  • @information23703
    @information23703 2 года назад

    very nice explanation.Love from Kashmir.

  • @ashrsfsiliman452
    @ashrsfsiliman452 3 года назад +1

    Thank you for your great job

  • @ulquiorra417ify
    @ulquiorra417ify 2 года назад

    Muchas gracias! :D

  • @Abhishek_Poddar
    @Abhishek_Poddar 3 года назад

    Ma'am...lots of thanks ...for these .. quality contents...these are literally so much understandable and relatable...plz keep it on...
    I have a doubt which may sound silly to u...😅but i m not able to click it in my mind...
    That one of the main purpose of using encapsulation is security too ...but i wanna say what's the security left if we can access the data members via getter and setter ..?
    I' m not able to get it .. though i have tried to google it everywhere also in ur other video of combined lecture of cpp ..
    I hope i'll get my anwer ❤️😣😣
    Plz take a piece of code of "employee security of a company"

  • @hkjhh2363
    @hkjhh2363 2 года назад

    Hi Saldida, thank you for video. Are you going to post video about setters and getters as well?

    • @day4834
      @day4834 2 года назад

      Hi, you may find some useful information here www.w3schools.com/cpp/cpp_encapsulation.asp

  • @technicalteam3298
    @technicalteam3298 Год назад +1

    you are really a nice teacher, till now I am not able to grasp the concepts of oops but because of your lucid explanation I am able to make it. thank you so much 🙂
    getter setter methods--
    public:
    void getter(){
    int ChannelName = " peaky blinders";
    }
    void setter(int setname){
    setname = ChannelName;
    }

    • @diegocamposjimenez666
      @diegocamposjimenez666 Год назад +1

      how are you using integer values to strings? What compiler are you using that didn't underline this error?

    • @basit3037
      @basit3037 Год назад

      @@diegocamposjimenez666 lmao thats funy xD

    • @thiruselvan5499
      @thiruselvan5499 Год назад

      you are really a nice teacher, till now I am not able to grasp the concepts of oops but because of your lucid explanation I am able to make it. thank you so much 🙂
      getter setter methods--
      public:
      void getter(){
      int ChannelName = " peaky blinders";
      }
      void setter(int setname){
      setname = ChannelName;
      }
      should be int ChannelName str ChannelName right

    • @stellaroasis
      @stellaroasis 9 месяцев назад

      @@thiruselvan5499 its still set to int , change it to string

  • @killaburribo
    @killaburribo 2 года назад +1

    you explain this much better than my professor, thank you!

  • @user-ox1is2th6f
    @user-ox1is2th6f 9 месяцев назад

    i am asking about the small buttons you use when you open those constructors small buttons in number 12 and 13 how did you do that how did you hide?thank you

  • @riddhabose9653
    @riddhabose9653 3 года назад +3

    Please make a video on C++ STL ! Amazing Work 👍!

    • @CodeBeauty
      @CodeBeauty  3 года назад +1

      That could be a topic for some of my future videos. I'm interested though, do you need it for school, work, or are you doing competitive programming or something else? ☺️

    • @pranjalverma9171
      @pranjalverma9171 3 года назад

      @@CodeBeauty For CP perspective

    • @pranjalverma9171
      @pranjalverma9171 3 года назад

      Till then can u suggest some resources to move forward!

    • @riddhabose9653
      @riddhabose9653 3 года назад

      @@CodeBeauty I personally need it for competitive programming. If you can make a video on it, it would be really great !

  • @gmmkeshav
    @gmmkeshav Год назад

    Love you for making videos in night for us

  • @user-ox1is2th6f
    @user-ox1is2th6f 9 месяцев назад

    hi may i ask how did you hide those info constructors number 12 and 13 im asking the button in the left what command you use?thank you stay safe

  • @chityinoo6150
    @chityinoo6150 2 года назад +1

    i really love u teacher Saldina

  • @subee128
    @subee128 Год назад +1

    Thanks

  • @shubhamkambale7515
    @shubhamkambale7515 2 года назад

    Hi please make video on data structure and algorithms please...........

  • @MrCoral821
    @MrCoral821 3 года назад

    Love your content !
    Thank you and send love from Israel

    • @limemmontassar3690
      @limemmontassar3690 2 года назад

      from palestine ? GOOD

    • @MrCoral821
      @MrCoral821 2 года назад

      ​@@limemmontassar3690 Funny. Can I encapsulate brainwashed comments?

  • @lickguitars1276
    @lickguitars1276 9 месяцев назад

    would we need a getter if we had a class method, if we had a private member would we need a constructor

  • @3yousif
    @3yousif 3 года назад +3

    why we have to put them in private and then create a method to modify them. private means we constantly want them to be untouched ; do we learn that for future need or I miss understand something

    • @CodeBeauty
      @CodeBeauty  3 года назад +13

      Why should we use encapsulation when it is much easier to access and change properties if we don't? That is a good question.
      The answer is because we don't want to allow other developers to change and access everything they want, but we want to expose only properties that they should be able to see and change, and they can use them only if they obey the rules that we define. In that way, our data stays safe from outside misuse, because if you allow someone to have full permissions and do whatever he/she wants, it's just a matter of time when that person will wander off the intended way of building that system, create some complex overkill logic that is hard to understand, make things very dependent on one another, write duplicated code, etc.
      So there are many benefits related to encapsulation: easier to maintain the code, hides the data, easier to test, reusable...
      Let me give you one simple example of an application that can be used only by people that are 18+ years old. When the user registers, he enters his age, and there you have to check if his age is >18.
      If it is, he should be able to use the app, but if it is not, throw him an error.
      Imagine also that the mentioned application has the option to edit user data. That means that the user can change his age after registration as well, so you would have to check again if age >18 and behave accordingly, so writing the same code once more.
      And then, if all of a sudden someone decides that the app will be for people who are 21+ only, you have two places where you need to make that change. (This is a simple example, changing 18 with 21 is easy, and having two places where you need to do that is easy, imagine having some complex logic that you need to change in 20 places)
      What you can do instead is you can do the "age >18" logic in the setter, and save the user's age if he is >18, and then write an error is he is not. That way each time that you want to set a value for the Age property, the same logic is executed, and each time that you have to change something, you do that in one place only. 😊

  • @garvitrajput8491
    @garvitrajput8491 3 года назад +2

    please make a vidoe on c++ stL !

  • @40wattstudio41
    @40wattstudio41 Год назад +1

    Ok, this is one I'll have to study more . . . .

  • @philosophia5577
    @philosophia5577 Год назад

    which font you are using in your editor tab?

  • @afrazhussain3778
    @afrazhussain3778 3 года назад

    mam why you use string name why not char*name is making pointer a good practice for string or not

  • @anuragghoshh
    @anuragghoshh 2 года назад +2

    Everytime you were explaining the source code, My attention was on your source code. Everytime you ran the program for the output, My attention was on you!!😍❤👅

  • @Rawan-cx9xk
    @Rawan-cx9xk Год назад

    can u explain linked list and stack please with oop?

  • @Local.man.
    @Local.man. 8 месяцев назад

    thank you

  • @ronjackson8829
    @ronjackson8829 3 года назад +1

    Does push_back turn the list into a vector, as in PublishedVideoTitles.push_back(title)?

  • @andrewsavage4557
    @andrewsavage4557 Месяц назад

    You look great as your content ❤

  • @kmalnasef1512
    @kmalnasef1512 3 года назад

    Thank you
    before watching this video
    I thought encapsulation means that we should put data and the methods relate to those data inside a unit called "class " !!!

  • @BrainyBlas
    @BrainyBlas 4 месяца назад

    Everyone should subscribe for both beauties,Code beauty and actual beauty

  • @relytheone853
    @relytheone853 3 года назад +4

    Been aware of programming for years, but never programmed anything.

    • @CodeBeauty
      @CodeBeauty  3 года назад +4

      Try a couple of tutorials from the beginning and let me know how it goes. Welcome! 😊

    • @ziquaftynny9285
      @ziquaftynny9285 3 года назад

      I've been aware of astronauts for years too, but never gone to space...

  • @dev.antunes
    @dev.antunes 3 года назад +1

    So, Encapsulation is all about making get and set methods for properties and raw methods, like in Java?

    • @CodeBeauty
      @CodeBeauty  3 года назад +3

      Yep, OOP concepts are the same for all OOP languages, and encapsulation is one of those concepts.
      There is also an example in the description of the video that might be interesting to read related to "why to use encapsulation" 😊

    • @antran540
      @antran540 3 года назад +1

      @@CodeBeauty what is the point of encapsulation because users are still able to modify private members indirectly through methods?

    • @barsyilmaz3485
      @barsyilmaz3485 3 года назад

      @@antran540 is right. I agree with him. What's your idea?

    • @mcalex4747
      @mcalex4747 2 года назад

      @@antran540 The subscriber part for example, it's by 1, If someone subscribes to you, you won't have 1 mil subs, but 1.
      If the user can choose how many subs should be, it won't be ok.
      So you have a rule, and you make the user respect it.

    • @root8272
      @root8272 2 года назад

      @@antran540 The theory is that you have the ability to change the way it gives an actual value if you need to. For example, if you needed to perform a calculation on the raw data, and that calculation might change over time, then you can rest assured that the consumer of your class will get the proper values back without having to change their code because you can make the change in your getter method, and the consumer doesn't have to deal with the calculation in their own code. If it's a setter method, it could validate data beyond something like a simple defined datatype could do.
      Due to differences in feature sets between languages, it works better in certain languages than others, and I can't say whether C++ is actually the best language to be doing this. The important thing is that if you're working on a code base that does utilize this, you know what is going on. It's a very common practice in the industry due to the popularity of Java, and its heavy use of this style by Java programmers. Prior to Java, this was not the way to do things. In recent times, there has also been some push back on this.

  • @milanrai1556
    @milanrai1556 Месяц назад

    your code @5:23 is not running in MacOs, xcode.

  • @ZeeshanAbbasiplanz
    @ZeeshanAbbasiplanz 11 месяцев назад

    so setter takes value, getter prints value is that it

  • @madalinavarga3337
    @madalinavarga3337 3 года назад +10

    i accepted your challenge and thank you

    • @arijkhan2516
      @arijkhan2516 2 года назад +2

      for your setName function, you should have this-> name = name. So that this way the computer knows which name you are referring to!

    • @ShepardCommander11
      @ShepardCommander11 2 года назад +1

      If anyone was curious about the above, basically you use "this->" to access the private data field variable (Name) and assign the private data field variable the parameter variable of the method (Name) that the user will specify in the main(), whether its hardcoded " " like CodeBeauty is doing, or user inputted via a cin.

  • @alonalon8794
    @alonalon8794 2 года назад

    By accessing private variables via public methods, the principle of encapsulation isn't violated?
    In other words, what's the difference between accessing private variables through public methods and defining the variables as public and then accessing them directly?

    • @day4834
      @day4834 2 года назад

      I read that it's good practice to declare your class attributes as private. Also, you only allow access to those private attributes you want for data security purposes.

  • @webslesson4u937
    @webslesson4u937 2 года назад +1

    Love your content!
    Thank you and send love from Pakistan

  • @sidratultushin4879
    @sidratultushin4879 Год назад

    My students, focus on what you are here for🙂

  • @sofienbenmahmoud1563
    @sofienbenmahmoud1563 2 года назад

    saldina i love you

  • @mechee1747
    @mechee1747 3 года назад

    Isn't it common practice to put a "_" at the start of every private variable to easily see that it's a private variable? Example: string _Name, _OwnerName; int _SubscriberCount;. My background involves Arduinos which gave me a good base knowledge on C++ but I'm learning the language outside of the Arduino platform. Your videos made that process so much easier. Keep up the good work!

    • @root8272
      @root8272 2 года назад

      This naming convention varies by code base. It's best to do it if that is what is already being done everywhere else or if there is a rule/style guide that mentions it, but it is certainly not considered a de facto way of doing things in C++, and there are some who actively discourage it.

    • @diegocamposjimenez666
      @diegocamposjimenez666 Год назад

      Well, as root said, it varies between developers as I like to use underscored names in the class method instead.

  • @yahatkunnarak1919
    @yahatkunnarak1919 11 месяцев назад

    🔥❤

  • @vsp2611
    @vsp2611 10 месяцев назад

    Hottest Coding Teacher Award goes to Saldina Nurak❤❤

  • @aj4337
    @aj4337 2 месяца назад

    Learning from your channel in 2024 and It's really helpful and easy to understand
    std::cout

    • @CodeBeauty
      @CodeBeauty  2 месяца назад

      I'm happy to hear that ❤️

  • @rohitjoshi2384
    @rohitjoshi2384 Год назад

    Excellent teaching.. with a bit of (soft) distractions....mmmm actually two of them...😶

  • @alexzanderegwuatu6298
    @alexzanderegwuatu6298 3 года назад +1

    You pretty and so smart.. thank u

  • @ThiyaguShanmugam
    @ThiyaguShanmugam 3 года назад +10

    I just came to see u, never mind about the topic.

  • @shinymp7691
    @shinymp7691 3 года назад

    Wow.

  • @subhammishra3433
    @subhammishra3433 Год назад +2

    Kya teacher m yr.... Ab toh isii se padhna h

  • @codecspy3479
    @codecspy3479 3 года назад

    Why is encapsulation even needed if we can anyway access and update the data variables declared as private using member functions. What are we hiding here ? We are just not letting the user to directly access the data variables but indirectly we are letting the user to access them using member functions. We are not hiding anything here !!! Correct me if i am wrong.

    • @kamalsabki8103
      @kamalsabki8103 3 года назад +2

      At least in most OO languages, encapsulation is roughly equivalent to the lock on the door of a bathroom.
      It's not intended to keep anybody out if they really insist on entering.
      It is intended as a courtesy to let people know that entering will lead mostly to:
      embarrassment, and
      a stinking mess.
      "answer founded in stackoverflow "

    • @codecspy3479
      @codecspy3479 3 года назад

      @@kamalsabki8103 Thanks for this. Its clear for me now. !!

  • @abbassadri5099
    @abbassadri5099 Год назад

    Lovely outfit😍

  • @kingrobert6249
    @kingrobert6249 2 года назад

    ❤️

  • @user-vo9pd5yc3f
    @user-vo9pd5yc3f 6 месяцев назад +5

    turn off the cam i cant focus😂

  • @ibrahim.moamen4508
    @ibrahim.moamen4508 3 года назад

    your content is very helpful but ,, why i cant focus on the content is this my mistake !!

  • @andristefanus
    @andristefanus 3 года назад

    it's so "hard" to learn this

  • @fusiontv5269
    @fusiontv5269 3 года назад +1

    9:08

  • @abelolivera1159
    @abelolivera1159 3 года назад

    💘