title
Object Oriented Programming (OOP) in C++ Course

description
Object Oriented Programming (OOP) is commonly used when writing code with C++. In this crash course, you will learn what OOP is and how to implement it using C++. This course was developed by Saldina Nurak (CodeBeauty). Check out her channel: https://www.youtube.com/c/CodeBeauty ⭐️ Course Contents ⭐️ ⌨️ (0:00:00) Introduction ⌨️ (0:00:54) Introduction to OOP ⌨️ (0:03:17) Classes and objects ⌨️ (0:10:40) Access modifiers ⌨️ (0:17:26) Constructors ⌨️ (0:29:39) Encapsulation ⌨️ (0:39:50) Abstraction ⌨️ (0:52:23) Inheritance ⌨️ (1:15:43) Polymorphism ⌨️ (1:28:26) Outro ⌨️ (1:29:01) Bloopers -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news

detail
{'title': 'Object Oriented Programming (OOP) in C++ Course', 'heatmap': [{'end': 1851.894, 'start': 1735.336, 'weight': 0.945}, {'end': 2447.227, 'start': 2380.443, 'weight': 0.723}, {'end': 2775.538, 'start': 2708.808, 'weight': 0.83}, {'end': 4616.006, 'start': 4557.914, 'weight': 0.926}, {'end': 5110.058, 'start': 5044.87, 'weight': 0.744}], 'summary': 'Provides an introduction to the object oriented programming (oop) course on the code beauty youtube channel, covering beginner basic level and advanced concepts with full course content available in the video description. it explores oop paradigm and basics, creating classes and objects in c++, constructors in java, oop principles, encapsulation, abstraction, abstract classes, inheritance, and polymorphism in c++, with practical examples and demonstrations.', 'chapters': [{'end': 42.444, 'segs': [{'end': 42.444, 'src': 'embed', 'start': 0.356, 'weight': 0, 'content': [{'end': 1.638, 'text': 'Hi everyone and welcome.', 'start': 0.356, 'duration': 1.282}, {'end': 2.819, 'text': 'My name is Saldina.', 'start': 1.898, 'duration': 0.921}, {'end': 8.707, 'text': 'I am a software engineer and I make programming related videos on Code Beauty YouTube channel.', 'start': 3, 'duration': 5.707}, {'end': 14.475, 'text': 'And in this video, I want to talk about OOP, so Object Oriented Programming.', 'start': 8.727, 'duration': 5.748}, {'end': 18.119, 'text': 'course will start on a beginner basic level.', 'start': 15.336, 'duration': 2.783}, {'end': 23.345, 'text': 'And then as the course progresses, we will see some of the more advanced concepts.', 'start': 18.379, 'duration': 4.966}, {'end': 29.732, 'text': 'I will explain those advanced concepts and I will show you how you can implement all of those concepts in code.', 'start': 23.565, 'duration': 6.167}, {'end': 34.057, 'text': 'You can find the full content of this course in the description of this video.', 'start': 30.413, 'duration': 3.644}, {'end': 35.399, 'text': 'So make sure to check that out.', 'start': 34.077, 'duration': 1.322}, {'end': 42.444, 'text': 'And then, if you want to see some different examples, if you want to learn more C++ and you want to upgrade your knowledge,', 'start': 35.899, 'duration': 6.545}], 'summary': 'Saldina, a software engineer, will teach oop with beginner and advanced concepts on code beauty youtube channel.', 'duration': 42.088, 'max_score': 0.356, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4356.jpg'}], 'start': 0.356, 'title': 'Introduction to oop course', 'summary': 'Provides an introduction to the object oriented programming (oop) course on the code beauty youtube channel, covering beginner basic level and advanced concepts, with the full course content available in the video description.', 'chapters': [{'end': 42.444, 'start': 0.356, 'title': 'Introduction to oop course on code beauty', 'summary': 'Provides an introduction to the object oriented programming (oop) course on the code beauty youtube channel, covering beginner basic level and advanced concepts, with the full course content available in the video description.', 'duration': 42.088, 'highlights': ['The OOP course on Code Beauty YouTube channel covers beginner basic level and advanced concepts.', 'The full content of the course can be found in the description of the video.', 'The course aims to teach how to implement advanced OOP concepts in code.']}], 'duration': 42.088, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4356.jpg', 'highlights': ['The OOP course on Code Beauty YouTube channel covers beginner basic level and advanced concepts.', 'The course aims to teach how to implement advanced OOP concepts in code.', 'The full content of the course can be found in the description of the video.']}, {'end': 356.981, 'segs': [{'end': 93.569, 'src': 'embed', 'start': 67.856, 'weight': 3, 'content': [{'end': 73.958, 'text': 'It is basically a standard in programming that we use to solve a specific type of problem.', 'start': 67.856, 'duration': 6.102}, {'end': 79.159, 'text': 'Now, besides object oriented paradigm, there are other programming paradigms as well.', 'start': 74.338, 'duration': 4.821}, {'end': 88.866, 'text': 'You may ask why? Well, we as humans have a lot of different types of problems and our computers help us solve those different types of problems.', 'start': 79.699, 'duration': 9.167}, {'end': 93.569, 'text': 'And if one paradigm is good to solve one type of problem, for example,', 'start': 89.466, 'duration': 4.103}], 'summary': 'Programming paradigms are used to solve different types of problems in programming.', 'duration': 25.713, 'max_score': 67.856, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix467856.jpg'}, {'end': 139.24, 'src': 'embed', 'start': 113.723, 'weight': 0, 'content': [{'end': 120.948, 'text': 'We want to be able to explain those objects to our computer and to represent those objects in our program.', 'start': 113.723, 'duration': 7.225}, {'end': 124.27, 'text': 'And that is exactly what OOP is used for.', 'start': 121.008, 'duration': 3.262}, {'end': 129.532, 'text': "So how does this work on a real life example? Let's use the example of car.", 'start': 124.83, 'duration': 4.702}, {'end': 136.038, 'text': 'So a car as an entity in real life has many different attributes, many different characteristics.', 'start': 130.054, 'duration': 5.984}, {'end': 139.24, 'text': 'And some of those are manufacturer of that car.', 'start': 136.698, 'duration': 2.542}], 'summary': 'Oop is used to represent real-life objects in programs, such as a car with various attributes.', 'duration': 25.517, 'max_score': 113.723, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4113723.jpg'}, {'end': 250.955, 'src': 'embed', 'start': 218.707, 'weight': 1, 'content': [{'end': 222.248, 'text': 'Class is building block of object oriented programming.', 'start': 218.707, 'duration': 3.541}, {'end': 226.693, 'text': 'And a class is basically a user-defined data type.', 'start': 222.988, 'duration': 3.705}, {'end': 234.882, 'text': 'And in order to be able to understand what are user-defined data types, you first need to understand what are predefined data types,', 'start': 227.073, 'duration': 7.809}, {'end': 236.424, 'text': 'what are built-in data types?', 'start': 234.882, 'duration': 1.542}, {'end': 242.028, 'text': 'data types like integer and float and double and character and so on.', 'start': 237.765, 'duration': 4.263}, {'end': 250.955, 'text': 'And if you are not familiar with these, I am going to refer you to my video that I made on my channel related to variables and data types.', 'start': 242.529, 'duration': 8.426}], 'summary': 'Class is a user-defined data type in object-oriented programming, including integer, float, double, and character data types.', 'duration': 32.248, 'max_score': 218.707, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4218707.jpg'}], 'start': 42.444, 'title': 'Oop paradigm and basics', 'summary': 'Explores object oriented programming (oop) paradigm, illustrating its use in representing real-life entities and emphasizing the importance of classes and user-defined data types. it uses the example of a car to demonstrate oop concepts.', 'chapters': [{'end': 164.185, 'start': 42.444, 'title': 'Understanding oop paradigm', 'summary': 'Explains the concept of object oriented programming (oop) as a programming paradigm used to represent real-life entities with their attributes and behaviors, and how it applies to solving specific types of problems, using the example of a car.', 'duration': 121.741, 'highlights': ['OOP is a programming paradigm used to represent real-life entities with their attributes and behaviors, and it is a set of rules and ideas in programming (e.g., manufacturer, color, price, max speed of a car).', 'Different programming paradigms exist to solve various types of problems, and OOP is not universally suitable for all problems (e.g., different types of cars have different attributes and characteristics).', 'The concept of OOP is used to represent real-life objects and their attributes in a program, such as the attributes of a car (e.g., manufacturer, color, price, max speed).']}, {'end': 356.981, 'start': 164.884, 'title': 'Object-oriented programming basics', 'summary': 'Explains the concept of object-oriented programming by using the example of representing a car in a program, emphasizing the importance of classes as the building blocks of object-oriented programming and how user-defined data types, represented by classes, can store complex data and characteristics for specific program needs.', 'duration': 192.097, 'highlights': ['Classes are the building blocks of object-oriented programming, representing user-defined data types that can store complex characteristics for specific program needs.', 'User-defined data types, represented by classes, can store complex data and characteristics for specific program needs.', 'The example of representing a car in a program is used to illustrate the concept of object-oriented programming.']}], 'duration': 314.537, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix442444.jpg', 'highlights': ['OOP is a programming paradigm for representing real-life entities with attributes and behaviors.', 'Classes are the building blocks of object-oriented programming, representing user-defined data types.', 'The concept of OOP is used to represent real-life objects and their attributes in a program.', 'Different programming paradigms exist to solve various types of problems, and OOP is not universally suitable for all problems.', 'User-defined data types, represented by classes, can store complex data and characteristics for specific program needs.']}, {'end': 1133.687, 'segs': [{'end': 433.41, 'src': 'embed', 'start': 404.761, 'weight': 5, 'content': [{'end': 410.566, 'text': 'And if I try to run this program now, that is not going to be possible, as you can see here.', 'start': 404.761, 'duration': 5.805}, {'end': 414.51, 'text': 'And it says here immediately, it says expected a semicolon.', 'start': 410.946, 'duration': 3.564}, {'end': 416.972, 'text': 'So you need to put semicolon here.', 'start': 414.57, 'duration': 2.402}, {'end': 423.142, 'text': 'Okay, now that we have created this employee class, we see that this class is empty.', 'start': 417.918, 'duration': 5.224}, {'end': 426.605, 'text': 'And what we need to put inside this class here.', 'start': 423.643, 'duration': 2.962}, {'end': 433.41, 'text': 'so inside these curly brackets, because that is the body of our class, we need to put members of this class.', 'start': 426.605, 'duration': 6.805}], 'summary': 'Program requires a semicolon; empty employee class needs members.', 'duration': 28.649, 'max_score': 404.761, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4404761.jpg'}, {'end': 540.873, 'src': 'embed', 'start': 497.092, 'weight': 1, 'content': [{'end': 502.234, 'text': 'So as you can see, at the end of each of these attributes, you put semicolon as well.', 'start': 497.092, 'duration': 5.142}, {'end': 507.018, 'text': 'Okay, so far our employee has three attributes, name, company, and age.', 'start': 502.774, 'duration': 4.244}, {'end': 510.501, 'text': 'And you can add many more attributes here if you want.', 'start': 507.458, 'duration': 3.043}, {'end': 517.486, 'text': 'You can add his title, you can add his email, you can add employment date, his birth date, and so many more.', 'start': 510.601, 'duration': 6.885}, {'end': 523.953, 'text': "But I'm not going to do that in this situation because I don't want to add a bunch of code that we will not be using,", 'start': 517.567, 'duration': 6.386}, {'end': 527.677, 'text': "because I'm going to add that code, as we need it, later in the program.", 'start': 523.953, 'duration': 3.724}, {'end': 531.492, 'text': 'So this class here does not represent data.', 'start': 528.331, 'duration': 3.161}, {'end': 533.972, 'text': 'This class here represents a blueprint.', 'start': 531.572, 'duration': 2.4}, {'end': 540.873, 'text': 'So whenever you want to create an employee, this class here will serve as a model for that employee.', 'start': 534.452, 'duration': 6.421}], 'summary': 'Employee class serves as a blueprint for creating an employee, with attributes like name, company, and age.', 'duration': 43.781, 'max_score': 497.092, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4497092.jpg'}, {'end': 711.341, 'src': 'embed', 'start': 683.802, 'weight': 2, 'content': [{'end': 689.604, 'text': 'And then protected is somewhere in between private and public, and it has certain rules to it.', 'start': 683.802, 'duration': 5.802}, {'end': 696.45, 'text': 'So we will be talking more about protected access modifier when we start talking about inheritance later in this course.', 'start': 689.664, 'duration': 6.786}, {'end': 699.792, 'text': 'So for now, you need to remember that there are three of them.', 'start': 696.79, 'duration': 3.002}, {'end': 702.374, 'text': 'There is private, there is public and protected.', 'start': 700.012, 'duration': 2.362}, {'end': 711.341, 'text': 'So in this particular situation, one rule is that everything inside your class is private by default.', 'start': 702.935, 'duration': 8.406}], 'summary': 'Inheritance in programming has three access modifiers: private, public, and protected.', 'duration': 27.539, 'max_score': 683.802, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4683802.jpg'}, {'end': 807.22, 'src': 'embed', 'start': 778.67, 'weight': 4, 'content': [{'end': 782.627, 'text': 'Okay And now, as you can see, the error has disappeared.', 'start': 778.67, 'duration': 3.957}, {'end': 791.372, 'text': 'And if I try to do this once more, we have all of these members, name, company name, and age, we have all of them here.', 'start': 782.767, 'duration': 8.605}, {'end': 792.652, 'text': 'They are offered to us.', 'start': 791.652, 'duration': 1}, {'end': 801.377, 'text': 'So that means that by changing this access modifier to public, we will be able to see all of these properties here.', 'start': 792.772, 'duration': 8.605}, {'end': 805.559, 'text': "So let's now set the values of these members.", 'start': 801.897, 'duration': 3.662}, {'end': 807.22, 'text': "Let's say that the name.", 'start': 805.899, 'duration': 1.321}], 'summary': 'Changing access modifier to public reveals all member properties.', 'duration': 28.55, 'max_score': 778.67, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4778670.jpg'}, {'end': 899.108, 'src': 'embed', 'start': 871.405, 'weight': 3, 'content': [{'end': 874.267, 'text': "Let's say, for example, that he can introduce himself.", 'start': 871.405, 'duration': 2.862}, {'end': 878.229, 'text': 'So he comes to work and he says, hello, my name is so-and-so.', 'start': 874.647, 'duration': 3.582}, {'end': 880.771, 'text': 'I work for this company and I am 25 years old.', 'start': 878.369, 'duration': 2.402}, {'end': 891.767, 'text': 'So how can we describe that behavior in this class here? Well, we can describe that with a class method and what a class method is.', 'start': 882.665, 'duration': 9.102}, {'end': 894.227, 'text': 'It is basically a function.', 'start': 891.907, 'duration': 2.32}, {'end': 899.108, 'text': 'So we are going to create a function inside this class employee.', 'start': 894.327, 'duration': 4.781}], 'summary': 'The class method in the employee class can describe the behavior of introducing oneself at work.', 'duration': 27.703, 'max_score': 871.405, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4871405.jpg'}, {'end': 1082.107, 'src': 'embed', 'start': 1047.137, 'weight': 0, 'content': [{'end': 1051.221, 'text': "So let's say that we want to create another employee in our program.", 'start': 1047.137, 'duration': 4.084}, {'end': 1054.703, 'text': 'So how would we do that? Well, we would use the same approach that we had here.', 'start': 1051.261, 'duration': 3.442}, {'end': 1063.149, 'text': "So employee, the name of my class, and then employee, let's call it employee two, which is going to be the name of the object.", 'start': 1055.144, 'duration': 8.005}, {'end': 1068.913, 'text': "So let's assign the values for these attributes for our second employee as well.", 'start': 1063.89, 'duration': 5.023}, {'end': 1082.107, 'text': "I'm going to say employee two like this, and his name is going to be john, for example, like this let's copy this two more times.", 'start': 1068.973, 'duration': 13.134}], 'summary': 'Creating a new employee object with attributes like name and assigning values.', 'duration': 34.97, 'max_score': 1047.137, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41047137.jpg'}], 'start': 356.981, 'title': 'Creating classes and objects in c++', 'summary': 'Covers creating an employee class with attributes like name, company, and age in c++, explaining syntax and the necessity of semicolons. it also discusses creating and accessing class objects, defining blueprints, accessing class members, and utilizing access modifiers to control member accessibility.', 'chapters': [{'end': 517.486, 'start': 356.981, 'title': 'Creating employee class in c++', 'summary': 'Demonstrates the process of creating an employee class in c++ and adding attributes such as name, company, and age, explaining the syntax and the necessity of semicolons, and mentions the possibility of adding more attributes.', 'duration': 160.505, 'highlights': ['The chapter demonstrates the process of creating an employee class in C++ and adding attributes such as name, company, and age', 'explaining the syntax and the necessity of semicolons', 'mentions the possibility of adding more attributes']}, {'end': 1133.687, 'start': 517.567, 'title': 'Creating and accessing class objects in c++', 'summary': 'Discusses the creation and accessing of class objects in c++, including defining a blueprint for creating objects, accessing class members, and utilizing access modifiers to control member accessibility, with an emphasis on the public access modifier being used to grant access to class members and the creation of class methods to represent behaviors.', 'duration': 616.12, 'highlights': ['The class serves as a blueprint for creating objects, specifying the attributes required for an employee object such as name, company name, and age.', 'Access modifiers, including private, public, and protected, are utilized to control the accessibility of class members.', 'The public access modifier is used to grant access to class members, allowing the setting and accessing of the name, company name, and age of an employee object.', "A class method is created to represent a behavior, with an example of an 'introduce yourself' function that outputs the employee's details, demonstrating the usage of class methods to avoid repetitive code."]}], 'duration': 776.706, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix4356981.jpg', 'highlights': ['The chapter demonstrates the process of creating an employee class in C++ and adding attributes such as name, company, and age', 'The class serves as a blueprint for creating objects, specifying the attributes required for an employee object such as name, company name, and age', 'Access modifiers, including private, public, and protected, are utilized to control the accessibility of class members', "A class method is created to represent a behavior, with an example of an 'introduce yourself' function that outputs the employee's details, demonstrating the usage of class methods to avoid repetitive code", 'The public access modifier is used to grant access to class members, allowing the setting and accessing of the name, company name, and age of an employee object', 'Explaining the syntax and the necessity of semicolons', 'Mentions the possibility of adding more attributes']}, {'end': 1710.841, 'segs': [{'end': 1182.081, 'src': 'embed', 'start': 1133.767, 'weight': 1, 'content': [{'end': 1137.57, 'text': 'And that is not really optimal because there is a better way.', 'start': 1133.767, 'duration': 3.803}, {'end': 1140.932, 'text': 'There is a better approach of constructing our objects.', 'start': 1137.61, 'duration': 3.322}, {'end': 1147.716, 'text': 'And in order for you to be able to understand this, I will have to tell you a story about constructors.', 'start': 1141.532, 'duration': 6.184}, {'end': 1151.758, 'text': 'So now you may wonder, Saldina, what is a constructor?', 'start': 1148.156, 'duration': 3.602}, {'end': 1161.965, 'text': 'Well, a constructor is a special type of method that is invoked each time that an object of a class is created.', 'start': 1151.838, 'duration': 10.127}, {'end': 1167.429, 'text': 'so whenever you create an object of a class, a constructor is invoked.', 'start': 1161.965, 'duration': 5.464}, {'end': 1172.914, 'text': 'so does that mean that here, and here as well, a constructor is invoked?', 'start': 1167.429, 'duration': 5.485}, {'end': 1175.375, 'text': 'the answer to that question is yes.', 'start': 1172.914, 'duration': 2.461}, {'end': 1178.358, 'text': 'now you may wonder okay, we have not created any constructor.', 'start': 1175.375, 'duration': 2.983}, {'end': 1179.879, 'text': 'you must be lying.', 'start': 1178.358, 'duration': 1.521}, {'end': 1182.081, 'text': 'well, let me demonstrate you something.', 'start': 1179.879, 'duration': 2.202}], 'summary': 'A better approach to constructing objects using constructors is explained.', 'duration': 48.314, 'max_score': 1133.767, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41133767.jpg'}, {'end': 1230.06, 'src': 'embed', 'start': 1207.049, 'weight': 2, 'content': [{'end': 1214.875, 'text': "So here we don't have anything, and then here we also don't have anything, and then here is a number which I am not going to try to read.", 'start': 1207.049, 'duration': 7.826}, {'end': 1220.537, 'text': 'okay?. But basically this here is the work of default constructor.', 'start': 1214.875, 'duration': 5.662}, {'end': 1230.06, 'text': 'So what is default constructor? Default constructor is a term to describe a constructor that is automatically generated by your compiler.', 'start': 1220.617, 'duration': 9.443}], 'summary': 'Default constructor is a term for a constructor automatically generated by the compiler.', 'duration': 23.011, 'max_score': 1207.049, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41207049.jpg'}, {'end': 1327.93, 'src': 'embed', 'start': 1298.123, 'weight': 3, 'content': [{'end': 1303.844, 'text': 'the second rule is that a constructor has the same name as the class that it belongs to.', 'start': 1298.123, 'duration': 5.721}, {'end': 1308.045, 'text': 'so the constructor of class employee will be called employee.', 'start': 1303.844, 'duration': 4.201}, {'end': 1310.438, 'text': 'So that is the second rule.', 'start': 1308.857, 'duration': 1.581}, {'end': 1314.461, 'text': 'The third rule is that constructor must be public.', 'start': 1310.778, 'duration': 3.683}, {'end': 1322.006, 'text': "Now, this I'm saying as a rule at this level of knowledge because a constructor does not necessarily need to be public always.", 'start': 1314.821, 'duration': 7.185}, {'end': 1327.93, 'text': 'There are certain situations, specific situations, when you would want to make your constructor private.', 'start': 1322.066, 'duration': 5.864}], 'summary': 'Constructor has same name as class, must be public, exceptions exist.', 'duration': 29.807, 'max_score': 1298.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41298123.jpg'}, {'end': 1678.452, 'src': 'embed', 'start': 1650.336, 'weight': 0, 'content': [{'end': 1653.717, 'text': 'So the first line is to construct that object.', 'start': 1650.336, 'duration': 3.381}, {'end': 1656.839, 'text': 'And then second line is to introduce that user.', 'start': 1653.777, 'duration': 3.062}, {'end': 1660.601, 'text': 'And we have managed to do that with our employee constructor,', 'start': 1657.139, 'duration': 3.462}, {'end': 1667.545, 'text': 'which is now doing that work of constructing the object based on the parameters that we pass to that constructor.', 'start': 1660.601, 'duration': 6.944}, {'end': 1669.906, 'text': 'That constructor receives those parameters here.', 'start': 1668.085, 'duration': 1.821}, {'end': 1672.268, 'text': 'here and then it constructs the object.', 'start': 1669.906, 'duration': 2.362}, {'end': 1678.452, 'text': 'here it initializes the values of that object and then in our introduce yourself function,', 'start': 1672.268, 'duration': 6.184}], 'summary': 'Employee constructor constructs and initializes object based on parameters.', 'duration': 28.116, 'max_score': 1650.336, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41650336.jpg'}], 'start': 1133.767, 'title': 'Constructors in java', 'summary': 'Delves into the concept of constructors, emphasizing their significance in object creation, discussing default and custom constructors in java, and demonstrating a reduction of code in the main function to only two lines per employee.', 'chapters': [{'end': 1206.548, 'start': 1133.767, 'title': 'Constructor story', 'summary': 'Explores the concept of constructors and their invocation when creating objects of a class, emphasizing the significance of constructors in object creation and demonstrating their impact through a code example.', 'duration': 72.781, 'highlights': ['A constructor is a special type of method that is invoked each time that an object of a class is created, highlighting the essential role of constructors in object creation.', 'The significance of constructors is demonstrated through a code example where the absence of explicit constructor invocation results in unassigned attribute values for created objects, illustrating the impact of constructors on object initialization.']}, {'end': 1710.841, 'start': 1207.049, 'title': 'Creating constructors in java', 'summary': 'Discusses the concept of default constructor, the rules for creating a custom constructor, and demonstrates the process of creating and using a custom constructor in java, resulting in a reduction of code in the main function to only two lines per employee.', 'duration': 503.792, 'highlights': ['The default constructor is automatically generated by the compiler when no custom constructor is created.', 'The three rules for creating constructors are: a constructor does not have a return type, a constructor has the same name as the class it belongs to, and a constructor must be public.', 'Creating a custom constructor allows for the initialization of object values based on parameters passed to the constructor, reducing the code in the main function to only two lines per employee.']}], 'duration': 577.074, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41133767.jpg', 'highlights': ['Creating a custom constructor reduces the code in the main function to only two lines per employee.', 'A constructor is a special type of method that is invoked each time that an object of a class is created.', 'The default constructor is automatically generated by the compiler when no custom constructor is created.', 'The three rules for creating constructors are: a constructor does not have a return type, a constructor has the same name as the class it belongs to, and a constructor must be public.', 'The significance of constructors is demonstrated through a code example where the absence of explicit constructor invocation results in unassigned attribute values for created objects.']}, {'end': 2318.675, 'segs': [{'end': 1851.894, 'src': 'heatmap', 'start': 1711.221, 'weight': 0, 'content': [{'end': 1712.983, 'text': 'And that is this transition here.', 'start': 1711.221, 'duration': 1.762}, {'end': 1717.525, 'text': 'Whew Hello and welcome back.', 'start': 1713.964, 'duration': 3.561}, {'end': 1721.307, 'text': "And let's continue talking about object-oriented programming.", 'start': 1718.205, 'duration': 3.102}, {'end': 1726.971, 'text': 'But before I continue, I want to make a quick summary of the things that we have learned so far in this course.', 'start': 1721.748, 'duration': 5.223}, {'end': 1734.716, 'text': 'So first, I have explained what is object-oriented programming and what is the main idea behind object-oriented paradigm.', 'start': 1727.551, 'duration': 7.165}, {'end': 1745.226, 'text': 'And then I have explained what are classes and what are objects and how you can use those classes and objects in order to represent real life entities,', 'start': 1735.336, 'duration': 9.89}, {'end': 1749.411, 'text': 'together with their attributes and their methods in your programs.', 'start': 1745.226, 'duration': 4.185}, {'end': 1750.852, 'text': 'describe them to your computer.', 'start': 1749.411, 'duration': 1.441}, {'end': 1756.917, 'text': 'And then we have also talked about access modifiers, so private, public, and protected.', 'start': 1751.593, 'duration': 5.324}, {'end': 1763.382, 'text': 'And then we have seen what are constructors and how you can create and use constructors.', 'start': 1757.578, 'duration': 5.804}, {'end': 1773.289, 'text': 'And now the time has come to talk about four most important principles, four pillars, four most important concepts of object-oriented programming.', 'start': 1763.902, 'duration': 9.387}, {'end': 1778.813, 'text': 'And those are encapsulation, abstraction, inheritance, and polymorphism.', 'start': 1773.71, 'duration': 5.103}, {'end': 1782.777, 'text': 'So the first one that I want to talk about is encapsulation.', 'start': 1779.654, 'duration': 3.123}, {'end': 1784.698, 'text': 'So what is encapsulation?', 'start': 1783.237, 'duration': 1.461}, {'end': 1793.345, 'text': 'The idea of encapsulation is idea of bundling or tying together data and methods that operate on that data,', 'start': 1785.299, 'duration': 8.046}, {'end': 1796.387, 'text': 'so that they are grouped together within a class.', 'start': 1793.345, 'duration': 3.042}, {'end': 1798.229, 'text': 'And why do we do this?', 'start': 1797.188, 'duration': 1.041}, {'end': 1809.62, 'text': 'Well, we do this with the purpose of preventing anyone or anything outside of our class to be able to directly access our data and to interact with it and to modify it.', 'start': 1798.449, 'duration': 11.171}, {'end': 1815.327, 'text': "So I am not saying that we don't want anyone to access our data at all.", 'start': 1810.261, 'duration': 5.066}, {'end': 1818.431, 'text': "I'm just saying that I don't want that to happen directly.", 'start': 1815.447, 'duration': 2.984}, {'end': 1824.538, 'text': "I don't want that other class to be able to directly modify and change and interact with my data.", 'start': 1818.511, 'duration': 6.027}, {'end': 1828.64, 'text': 'because I want to provide my own way for that to happen.', 'start': 1824.938, 'duration': 3.702}, {'end': 1830.181, 'text': 'So how do I do that?', 'start': 1829.02, 'duration': 1.161}, {'end': 1835.164, 'text': 'How do I provide a way for other classes to interact with the properties of my class?', 'start': 1830.241, 'duration': 4.923}, {'end': 1843.729, 'text': 'Well, I provide very specific public functions that that other class can invoke and in that way interact with my data.', 'start': 1835.724, 'duration': 8.005}, {'end': 1851.894, 'text': 'So again, how do you access encapsulated properties of a class? The answer is through its methods.', 'start': 1844.129, 'duration': 7.765}], 'summary': 'Introduction to object-oriented programming, including principles of encapsulation, abstraction, inheritance, and polymorphism, with explanation of their purpose and implementation.', 'duration': 98.399, 'max_score': 1711.221, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41711221.jpg'}, {'end': 1883.537, 'src': 'embed', 'start': 1835.724, 'weight': 5, 'content': [{'end': 1843.729, 'text': 'Well, I provide very specific public functions that that other class can invoke and in that way interact with my data.', 'start': 1835.724, 'duration': 8.005}, {'end': 1851.894, 'text': 'So again, how do you access encapsulated properties of a class? The answer is through its methods.', 'start': 1844.129, 'duration': 7.765}, {'end': 1857.737, 'text': 'And these methods are very often implemented as getters and setters.', 'start': 1852.814, 'duration': 4.923}, {'end': 1869.323, 'text': "So now I'm going to show you in code how those getters and setters look like and how we can modify this program that I have here so that we obey that rule of encapsulation.", 'start': 1857.837, 'duration': 11.486}, {'end': 1876.935, 'text': 'So the first thing that I want to do here in this program is I want to make these three properties.', 'start': 1870.393, 'duration': 6.542}, {'end': 1878.496, 'text': 'I want to make them private.', 'start': 1877.115, 'duration': 1.381}, {'end': 1883.537, 'text': 'So I want to encapsulate these three properties, hide them within this class.', 'start': 1878.556, 'duration': 4.981}], 'summary': 'Demonstrates encapsulation through private methods and properties in a class.', 'duration': 47.813, 'max_score': 1835.724, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41835724.jpg'}, {'end': 2120, 'src': 'embed', 'start': 2093.618, 'weight': 7, 'content': [{'end': 2097.562, 'text': 'And then here are setter and getter methods for age.', 'start': 2093.618, 'duration': 3.944}, {'end': 2105.489, 'text': 'And now, because these methods here are public, everyone outside of our class should be able to access these methods.', 'start': 2098.042, 'duration': 7.447}, {'end': 2110.673, 'text': 'Whereas These three properties are now encapsulated, which means that they are private.', 'start': 2105.829, 'duration': 4.844}, {'end': 2120, 'text': 'They are hidden within this class and no one else besides members of this class here are going to be able to access them directly.', 'start': 2110.733, 'duration': 9.267}], 'summary': 'Encapsulation achieved with three private properties and public getter and setter methods for age.', 'duration': 26.382, 'max_score': 2093.618, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix42093618.jpg'}], 'start': 1711.221, 'title': 'Object-oriented programming principles', 'summary': 'Introduces the key concepts of object-oriented programming, covering classes, objects, access modifiers, constructors, and the four main principles: encapsulation, abstraction, inheritance, and polymorphism. it also explains encapsulation in object-oriented programming, emphasizing the bundling of data and methods within a class, with specific focus on creating getters and setters to maintain data integrity and access control, demonstrated using c++ code.', 'chapters': [{'end': 1782.777, 'start': 1711.221, 'title': 'Object-oriented programming principles', 'summary': 'Introduces the key concepts of object-oriented programming, covering topics such as classes, objects, access modifiers, constructors, and the four main principles: encapsulation, abstraction, inheritance, and polymorphism.', 'duration': 71.556, 'highlights': ["Encapsulation is one of the four most important principles of object-oriented programming, emphasizing the bundling of data with the methods that operate on that data, and limiting direct access to some of an object's components, providing data protection. It is crucial in building secure and maintainable systems.", 'The chapter covers topics such as access modifiers, including private, public, and protected, which control the visibility and accessibility of class members. Understanding and appropriately using access modifiers is essential for designing robust and secure object-oriented systems.', 'The transcript introduces constructors and their role in creating and initializing objects, a fundamental concept in object-oriented programming. Understanding how to create and use constructors is essential for building effective and efficient object-oriented systems.', 'The discussion delves into the explanation of classes and objects, emphasizing their role in representing real-life entities, along with their attributes and methods in programs, thereby providing a foundation for understanding object-oriented programming.', 'The chapter provides a quick summary of the foundational concepts of object-oriented programming, including the main idea behind the object-oriented paradigm and its application in representing real-life entities in programs.']}, {'end': 2318.675, 'start': 1783.237, 'title': 'Encapsulation in oop', 'summary': 'Explains encapsulation in object-oriented programming, emphasizing the bundling of data and methods within a class, with specific focus on creating getters and setters to maintain data integrity and access control, demonstrated using c++ code.', 'duration': 535.438, 'highlights': ['The chapter emphasizes the concept of encapsulation, highlighting the bundling of data and methods within a class to prevent direct access and modification from outside, promoting data integrity and security.', "The use of specific public functions, such as getters and setters, is outlined as the recommended approach for interacting with encapsulated properties, ensuring controlled access to the class's data.", 'The process of encapsulating properties by making them private within a class is demonstrated, showcasing the use of getters and setters to provide controlled access to the encapsulated properties, reinforcing the concept of data protection and controlled interaction.', 'The implementation of validation rules within the setter methods to enforce specific conditions, such as age validation, is illustrated, emphasizing the ability of encapsulation to provide specific rules and constraints for interacting with data.']}], 'duration': 607.454, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix41711221.jpg', 'highlights': ['Encapsulation is crucial in building secure and maintainable systems.', 'Understanding and appropriately using access modifiers is essential for designing robust and secure object-oriented systems.', 'Understanding how to create and use constructors is essential for building effective and efficient object-oriented systems.', 'The chapter provides a quick summary of the foundational concepts of object-oriented programming.', 'The chapter emphasizes the concept of encapsulation, highlighting the bundling of data and methods within a class to prevent direct access and modification from outside, promoting data integrity and security.', "The use of specific public functions, such as getters and setters, is outlined as the recommended approach for interacting with encapsulated properties, ensuring controlled access to the class's data.", 'The process of encapsulating properties by making them private within a class is demonstrated, showcasing the use of getters and setters to provide controlled access to the encapsulated properties, reinforcing the concept of data protection and controlled interaction.', 'The implementation of validation rules within the setter methods to enforce specific conditions, such as age validation, is illustrated, emphasizing the ability of encapsulation to provide specific rules and constraints for interacting with data.', 'The chapter covers topics such as access modifiers, including private, public, and protected, which control the visibility and accessibility of class members.', 'The discussion delves into the explanation of classes and objects, emphasizing their role in representing real-life entities, along with their attributes and methods in programs, thereby providing a foundation for understanding object-oriented programming.']}, {'end': 2618.851, 'segs': [{'end': 2447.227, 'src': 'heatmap', 'start': 2367.634, 'weight': 0, 'content': [{'end': 2372.477, 'text': 'And then whoever wants to access these properties outside of this class,', 'start': 2367.634, 'duration': 4.843}, {'end': 2379.862, 'text': "we'll have to go through the methods that you expose that do have access to your private properties.", 'start': 2372.477, 'duration': 7.385}, {'end': 2389.785, 'text': "Okay So let's collapse this and Here are those six getters and setters for these three properties here.", 'start': 2380.443, 'duration': 9.342}, {'end': 2394.539, 'text': 'The second principle that I want to talk about is called abstraction.', 'start': 2390.956, 'duration': 3.583}, {'end': 2403.425, 'text': 'What is abstraction? Abstraction means hiding complex things behind a procedure that makes those things look simple.', 'start': 2395.039, 'duration': 8.386}, {'end': 2408.408, 'text': "So in order to explain this, let's use an everyday life example.", 'start': 2404.085, 'duration': 4.323}, {'end': 2410.79, 'text': "Let's use the example of your smartphone.", 'start': 2408.949, 'duration': 1.841}, {'end': 2416.954, 'text': 'So one of the main characteristics that smartphones have these days is that they can take pictures.', 'start': 2411.39, 'duration': 5.564}, {'end': 2423.257, 'text': "So how does that procedure of taking a picture looks like? Well, it's pretty simple, at least on your side.", 'start': 2417.335, 'duration': 5.922}, {'end': 2430.02, 'text': 'You just press a button and you have taken a picture or you press a button and then you make a call or you send a message.', 'start': 2423.297, 'duration': 6.723}, {'end': 2436.022, 'text': 'But that is not really that simple because for you, it is just a button click.', 'start': 2430.6, 'duration': 5.422}, {'end': 2438.803, 'text': 'But for the company that makes those smartphones,', 'start': 2436.102, 'duration': 2.701}, {'end': 2447.227, 'text': 'there is much more complex logic that they need to implement in order for you to be able to press a button and then take a picture.', 'start': 2438.803, 'duration': 8.424}], 'summary': 'Abstraction hides complex procedures behind simple interfaces, such as smartphone camera functionality.', 'duration': 49.32, 'max_score': 2367.634, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix42367634.jpg'}, {'end': 2563.065, 'src': 'embed', 'start': 2533.345, 'weight': 3, 'content': [{'end': 2537.588, 'text': 'so they will make mistakes and they will use those smartphones in wrong ways.', 'start': 2533.345, 'duration': 4.243}, {'end': 2544.692, 'text': 'So this process of hiding that complexity from you as a user is called abstraction.', 'start': 2538.388, 'duration': 6.304}, {'end': 2549.035, 'text': 'And in that way, this very, very complex system is hidden.', 'start': 2545.073, 'duration': 3.962}, {'end': 2555.34, 'text': 'And this system here is represented as very simple system by this contract.', 'start': 2549.356, 'duration': 5.984}, {'end': 2563.065, 'text': "So let's see how we can implement this contract here that makes one side look simple and then other side very complex.", 'start': 2555.7, 'duration': 7.365}], 'summary': 'Abstraction hides complexity in systems, making them appear simple to users.', 'duration': 29.72, 'max_score': 2533.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix42533345.jpg'}], 'start': 2318.955, 'title': 'Encapsulation, abstraction, and understanding abstraction in programming', 'summary': 'Covers encapsulation, emphasizing private properties and validation rules. it also explains abstraction through the example of smartphones, highlighting its role in hiding complexity and maintaining user-friendly systems.', 'chapters': [{'end': 2394.539, 'start': 2318.955, 'title': 'Encapsulation and abstraction', 'summary': 'Covers the concept of encapsulation by demonstrating how to apply validation rules to setter methods and emphasizes the importance of making properties private. it also discusses the principle of abstraction in object-oriented programming.', 'duration': 75.584, 'highlights': ['The chapter emphasizes the importance of making properties private and applying validation rules to setter methods.', 'It discusses the concept of encapsulation and its role in restricting direct access to properties.', 'The second principle covered is abstraction in object-oriented programming.']}, {'end': 2618.851, 'start': 2395.039, 'title': 'Understanding abstraction in programming', 'summary': 'Explains the concept of abstraction by using the example of smartphones, highlighting how complex logic is hidden from the user through a simple interface, and how abstraction is essential for developing user-friendly systems and maintaining complexity in programming.', 'duration': 223.812, 'highlights': ['Abstraction in smartphones: hiding complex logic', 'Importance of abstraction in programming', 'Implementing abstraction in programming']}], 'duration': 299.896, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix42318955.jpg', 'highlights': ['The chapter emphasizes the importance of making properties private and applying validation rules to setter methods.', 'It discusses the concept of encapsulation and its role in restricting direct access to properties.', 'The second principle covered is abstraction in object-oriented programming.', 'Abstraction in smartphones: hiding complex logic', 'Importance of abstraction in programming', 'Implementing abstraction in programming']}, {'end': 3012.231, 'segs': [{'end': 2775.538, 'src': 'heatmap', 'start': 2643.855, 'weight': 0, 'content': [{'end': 2651.942, 'text': 'and then we should provide that simple and basic interface for anyone who wants to use this class here.', 'start': 2643.855, 'duration': 8.087}, {'end': 2653.703, 'text': 'so how do you do that?', 'start': 2651.942, 'duration': 1.761}, {'end': 2655.965, 'text': 'how do you create that contract?', 'start': 2653.703, 'duration': 2.262}, {'end': 2659.727, 'text': 'Well, the answer is by using abstract classes.', 'start': 2656.565, 'duration': 3.162}, {'end': 2668.772, 'text': 'For those of you who are coming from C sharp or Java world, there is already this concept of interface that some of you might be familiar with.', 'start': 2660.327, 'duration': 8.445}, {'end': 2675.415, 'text': 'And in C++, you can simulate behavior of interface by using abstract class.', 'start': 2669.052, 'duration': 6.363}, {'end': 2677.977, 'text': "So let's create an abstract class.", 'start': 2675.836, 'duration': 2.141}, {'end': 2687.707, 'text': "So here on the top, I am going to create a class and let's create a class called abstract employee.", 'start': 2679.52, 'duration': 8.187}, {'end': 2695.883, 'text': 'like this, or you can call it I employee if you want.', 'start': 2691.721, 'duration': 4.162}, {'end': 2703.906, 'text': 'So this class here is going to serve as a contract and this contract will have only one rule.', 'start': 2696.703, 'duration': 7.203}, {'end': 2708.808, 'text': 'And that rule is that whichever class decides to sign this contract,', 'start': 2704.046, 'duration': 4.762}, {'end': 2714.39, 'text': 'that class will need to provide implementation for a method called ask for promotion.', 'start': 2708.808, 'duration': 5.582}, {'end': 2721.333, 'text': 'So a method of return type void called ask for promotion.', 'start': 2714.83, 'duration': 6.503}, {'end': 2725.247, 'text': 'like this.', 'start': 2724.827, 'duration': 0.42}, {'end': 2736.918, 'text': 'And we are also going to make this obligatory, which means that we will force any class that signs this contract here to implement this method here.', 'start': 2726.328, 'duration': 10.59}, {'end': 2744.224, 'text': 'So how can we make this obligatory? The answer is by making this function here, a pure virtual function.', 'start': 2736.978, 'duration': 7.246}, {'end': 2754.507, 'text': "So I'm going to say here, virtual And then here I'm going to say is equal to zero.", 'start': 2744.765, 'duration': 9.742}, {'end': 2759.41, 'text': 'And now this class here has become an abstract class.', 'start': 2755.508, 'duration': 3.902}, {'end': 2766.273, 'text': 'And this method here, this function is pure virtual function or an abstract function.', 'start': 2759.97, 'duration': 6.303}, {'end': 2775.538, 'text': 'And this means that whoever decides to sign this contract, called abstract employee, that class that signs this contract,', 'start': 2766.713, 'duration': 8.825}], 'summary': 'Create a contract using abstract class for method implementation in c++.', 'duration': 93.063, 'max_score': 2643.855, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix42643855.jpg'}], 'start': 2619.571, 'title': 'Abstract classes in c++', 'summary': 'Covers creating abstract classes in c++ to provide a basic interface, simulating behavior of interfaces from c# or java, and emphasizes their role in creating contracts for complex functionalities. it also discusses the implementation of abstract classes and methods, including making functions obligatory and providing method implementations, along with a practical example based on age criteria.', 'chapters': [{'end': 2703.906, 'start': 2619.571, 'title': 'Creating abstract classes in c++', 'summary': 'Discusses the process of creating abstract classes in c++ to provide a simple and basic interface for other developers, utilizing abstract classes to simulate the behavior of interfaces from c# or java, and emphasizing the role of abstract classes in creating a contract for complex functionalities.', 'duration': 84.335, 'highlights': ['The chapter discusses the process of creating abstract classes in C++ to provide a simple and basic interface for other developers.', 'Utilizing abstract classes to simulate the behavior of interfaces from C# or Java.', 'Emphasizing the role of abstract classes in creating a contract for complex functionalities.']}, {'end': 3012.231, 'start': 2704.046, 'title': 'Implementing abstract classes and methods', 'summary': 'Discusses the implementation of abstract classes and methods, including the process of signing a contract, making a function obligatory, and providing implementation for a method. it also illustrates a simple example of implementing the ask for promotion method based on age criteria.', 'duration': 308.185, 'highlights': ['The process of signing a contract involves a class providing implementation for a method called ask for promotion, which is made obligatory by using a pure virtual function, resulting in an abstract class.', 'Providing implementation for the ask for promotion method involves defining logic based on certain criteria, such as age, and testing the method to verify the promotion outcome.']}], 'duration': 392.66, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix42619571.jpg', 'highlights': ['Utilizing abstract classes to simulate the behavior of interfaces from C# or Java.', 'Emphasizing the role of abstract classes in creating a contract for complex functionalities.', 'The process of signing a contract involves a class providing implementation for a method called ask for promotion, which is made obligatory by using a pure virtual function, resulting in an abstract class.', 'The chapter discusses the process of creating abstract classes in C++ to provide a simple and basic interface for other developers.', 'Providing implementation for the ask for promotion method involves defining logic based on certain criteria, such as age, and testing the method to verify the promotion outcome.']}, {'end': 4519.005, 'segs': [{'end': 3263.129, 'src': 'embed', 'start': 3212.491, 'weight': 0, 'content': [{'end': 3216.953, 'text': "Let's return to the example of a car that I used in the beginning of this video.", 'start': 3212.491, 'duration': 4.462}, {'end': 3222.133, 'text': 'A car as a class is going to have certain attributes.', 'start': 3218.47, 'duration': 3.663}, {'end': 3227.577, 'text': 'For example, a name, a model, price, a color, and so on.', 'start': 3222.173, 'duration': 5.404}, {'end': 3230.08, 'text': 'And then it is going to have behaviors as well.', 'start': 3228.018, 'duration': 2.062}, {'end': 3233.122, 'text': 'For example, it has a method called drive.', 'start': 3230.16, 'duration': 2.962}, {'end': 3238.566, 'text': 'Now, what kind of derived classes can we create from this base class?', 'start': 3233.622, 'duration': 4.944}, {'end': 3241.449, 'text': 'What kind of classes are more specific?', 'start': 3238.647, 'duration': 2.802}, {'end': 3246.013, 'text': 'So what kind of car types are more specific than just car?', 'start': 3241.849, 'duration': 4.164}, {'end': 3254.146, 'text': "Let's say, for example, that we are going to have one derived class that is called electric car and then another derived class,", 'start': 3247.304, 'duration': 6.842}, {'end': 3257.487, 'text': 'which is called conventional car or gas car.', 'start': 3254.146, 'duration': 3.341}, {'end': 3263.129, 'text': 'Now, this electric car is also going to have all the same properties that a car has.', 'start': 3258.047, 'duration': 5.082}], 'summary': 'Car class has attributes like name, model, price, color, and behaviors like drive. derived classes include electric and conventional cars.', 'duration': 50.638, 'max_score': 3212.491, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43212491.jpg'}, {'end': 3361.73, 'src': 'embed', 'start': 3334.861, 'weight': 6, 'content': [{'end': 3338.824, 'text': 'So what kind of class can inherit from employee class?', 'start': 3334.861, 'duration': 3.963}, {'end': 3342.227, 'text': 'Logically, what is more specific type of employee?', 'start': 3339.004, 'duration': 3.223}, {'end': 3347.391, 'text': "Let's say, for example, that we want to create a class called developer.", 'start': 3342.867, 'duration': 4.524}, {'end': 3349.192, 'text': "So let's do that here.", 'start': 3347.451, 'duration': 1.741}, {'end': 3353.776, 'text': "I'm going to say class and then let's call this class developer.", 'start': 3349.252, 'duration': 4.524}, {'end': 3356.828, 'text': 'like this.', 'start': 3356.448, 'duration': 0.38}, {'end': 3361.73, 'text': 'Okay So with this, we have created a class called developer.', 'start': 3356.848, 'duration': 4.882}], 'summary': 'Creating a class called developer that inherits from employee class.', 'duration': 26.869, 'max_score': 3334.861, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43334861.jpg'}, {'end': 3489.839, 'src': 'embed', 'start': 3464.049, 'weight': 9, 'content': [{'end': 3475.255, 'text': 'So if this developer indeed has access to all the properties that our employee has, and then to this one here, which is specific for developer only.', 'start': 3464.049, 'duration': 11.206}, {'end': 3478.357, 'text': "So let's delete this code here.", 'start': 3475.675, 'duration': 2.682}, {'end': 3482.559, 'text': 'And then I want to create an object of class developer.', 'start': 3478.377, 'duration': 4.182}, {'end': 3489.839, 'text': "So I'm going to say developer, And let's call that object D like this.", 'start': 3482.619, 'duration': 7.22}], 'summary': 'A developer is given access to specific properties and code is deleted.', 'duration': 25.79, 'max_score': 3464.049, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43464049.jpg'}, {'end': 3593.913, 'src': 'embed', 'start': 3564.066, 'weight': 8, 'content': [{'end': 3567.547, 'text': 'And then third rule is that it needs to be public.', 'start': 3564.066, 'duration': 3.481}, {'end': 3572.749, 'text': "So I'm going to call this constructor developer like this.", 'start': 3567.987, 'duration': 4.762}, {'end': 3574.55, 'text': 'Oh, sorry.', 'start': 3573.97, 'duration': 0.58}, {'end': 3578.582, 'text': 'And then I need to put these curly brackets here.', 'start': 3576.4, 'duration': 2.182}, {'end': 3585.407, 'text': 'Okay, so now the job of this constructor here is going to be to construct developer object.', 'start': 3579.282, 'duration': 6.125}, {'end': 3593.913, 'text': 'And considering that this developer object inherited from employee class, that means that developer has these properties.', 'start': 3585.868, 'duration': 8.045}], 'summary': 'Constructor needs to be public and construct developer object.', 'duration': 29.847, 'max_score': 3564.066, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43564066.jpg'}, {'end': 3890.593, 'src': 'embed', 'start': 3856.021, 'weight': 11, 'content': [{'end': 3870.306, 'text': "And then here I'm going to say fixed bug using, and then let's use this programming language here like this.", 'start': 3856.021, 'duration': 14.285}, {'end': 3877.029, 'text': 'Okay And now if I want to test this method here, I can invoke it on my developer class.', 'start': 3871.687, 'duration': 5.342}, {'end': 3879.87, 'text': "So I'm going to say D dot fix bug.", 'start': 3877.089, 'duration': 2.781}, {'end': 3890.593, 'text': 'And if I run my program, As you can see, this method here works, and then the values that we passed in our constructor have successfully been set.', 'start': 3880.93, 'duration': 9.663}], 'summary': 'Fixed bug using programming language, tested method, values set successfully.', 'duration': 34.572, 'max_score': 3856.021, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43856021.jpg'}, {'end': 4006.022, 'src': 'embed', 'start': 3984.306, 'weight': 4, 'content': [{'end': 3993.453, 'text': 'public, private and protected, and I promised you that I am going to explain what this what protected access modifier, means.', 'start': 3984.306, 'duration': 9.147}, {'end': 4000.258, 'text': 'so in this situation, if we make this property here, if we make this name property protected,', 'start': 3993.453, 'duration': 6.805}, {'end': 4006.022, 'text': 'that will make name available in derived classes of this employee class here.', 'start': 4000.258, 'duration': 5.764}], 'summary': 'Explaining the meaning of the protected access modifier in the context of inheritance.', 'duration': 21.716, 'max_score': 3984.306, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43984306.jpg'}, {'end': 4137.358, 'src': 'embed', 'start': 4108.801, 'weight': 5, 'content': [{'end': 4112.606, 'text': 'So how can I fix that problem? Well, the answer is pretty simple.', 'start': 4108.801, 'duration': 3.805}, {'end': 4119.729, 'text': 'This inheritance here, so this part of the code here, this inheritance is private by default.', 'start': 4113.246, 'duration': 6.483}, {'end': 4123.671, 'text': 'And in order to fix the problem that we have, we need to make it public.', 'start': 4120.13, 'duration': 3.541}, {'end': 4129.274, 'text': "So here I'm going to say public, and the problem should disappear.", 'start': 4123.711, 'duration': 5.563}, {'end': 4137.358, 'text': 'So if I return to my developer object now, and if I try to ask for promotion, as you can see, that method is available.', 'start': 4129.613, 'duration': 7.745}], 'summary': 'To fix the problem, change the inheritance from private to public.', 'duration': 28.557, 'max_score': 4108.801, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44108801.jpg'}, {'end': 4246.85, 'src': 'embed', 'start': 4184.397, 'weight': 3, 'content': [{'end': 4189.499, 'text': "So here I'm going to go one more time through this process of creating derived class.", 'start': 4184.397, 'duration': 5.102}, {'end': 4202.445, 'text': 'so i will say class and then i will call it teacher like this okay, and with this we have successfully created a class called teacher.', 'start': 4190.479, 'duration': 11.966}, {'end': 4211.272, 'text': 'and now what i want to do is i want to inherit from my employee class like this OK,', 'start': 4202.445, 'duration': 8.827}, {'end': 4217.082, 'text': "and then what I need to do is let's first create some specific attributes for my teacher.", 'start': 4211.272, 'duration': 5.81}, {'end': 4222.331, 'text': "So let's say, for example, that a teacher has attribute called subject.", 'start': 4217.142, 'duration': 5.189}, {'end': 4227.114, 'text': 'So this here is the subject that my teacher is teaching.', 'start': 4223.891, 'duration': 3.223}, {'end': 4234.46, 'text': "And then let's say also that the teacher will have a functionality that is going to be specific for this class only.", 'start': 4227.634, 'duration': 6.826}, {'end': 4239.144, 'text': 'And that functionality will be called prepare lesson, for example.', 'start': 4234.98, 'duration': 4.164}, {'end': 4246.85, 'text': "So I'm going to say void, prepare lesson like this.", 'start': 4239.204, 'duration': 7.646}], 'summary': "Creating a derived class 'teacher' with specific attributes and functionality like 'subject' and 'prepare lesson'.", 'duration': 62.453, 'max_score': 4184.397, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44184397.jpg'}, {'end': 4339.334, 'src': 'embed', 'start': 4309.301, 'weight': 10, 'content': [{'end': 4312.824, 'text': 'because everything inside the class is private by default.', 'start': 4309.301, 'duration': 3.523}, {'end': 4314.465, 'text': 'So that is going to be the first problem.', 'start': 4312.904, 'duration': 1.561}, {'end': 4315.846, 'text': "And let's fix it.", 'start': 4315.005, 'duration': 0.841}, {'end': 4319.228, 'text': "So I'm going to say public like this.", 'start': 4315.906, 'duration': 3.322}, {'end': 4321.137, 'text': 'okay now.', 'start': 4320.296, 'duration': 0.841}, {'end': 4326.862, 'text': 'second thing that is going to be a problem for us is that this teacher class here does not have a constructor.', 'start': 4321.137, 'duration': 5.725}, {'end': 4331.707, 'text': 'so if i try to create an object of type teacher, i will not be able to do that.', 'start': 4326.862, 'duration': 4.845}, {'end': 4333.849, 'text': "so let's demonstrate that error.", 'start': 4331.707, 'duration': 2.142}, {'end': 4339.334, 'text': "now i'm going to say teacher like this, and let's call it t.", 'start': 4333.849, 'duration': 5.485}], 'summary': 'Issues with default privacy and missing constructor in the teacher class.', 'duration': 30.033, 'max_score': 4309.301, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44309301.jpg'}], 'start': 3012.891, 'title': 'Object-oriented programming principles', 'summary': "Explains the implementation of abstract classes, inheritance using car classes, and properties of derived classes. it demonstrates creating a 'developer' subclass, accessing properties, and addressing inheritance issues. it also covers the creation of a teacher class, access modifiers, and constructors.", 'chapters': [{'end': 3311.168, 'start': 3012.891, 'title': 'Object-oriented programming principles', 'summary': 'Explains the implementation of an abstract class as a contract to enforce method implementation, demonstrates the concept of inheritance using the example of car classes, and highlights the specific attributes and behaviors of derived classes, such as electric and conventional cars.', 'duration': 298.277, 'highlights': ['The chapter explains the implementation of an abstract class as a contract to enforce method implementation, demonstrating the concept of inheritance using the example of car classes. It emphasizes the specific attributes and behaviors of derived classes, such as electric and conventional cars.', 'Demonstrates the concept of inheritance using the example of car classes, explaining how derived classes, such as electric and conventional cars, inherit attributes and behaviors from the base class while also having their own specific members.', 'Explains the concept of inheritance, illustrating how a derived class inherits all the members of the base class and can have its own specific members, using the example of electric and conventional cars as specific types derived from the base class of car.']}, {'end': 3802.454, 'start': 3311.168, 'title': 'Inheritance in oop: developer class example', 'summary': "Explains inheritance in object-oriented programming by demonstrating the creation of a 'developer' subclass inheriting from the 'employee' superclass, utilizing constructors and initializing specific properties, and creating and testing an object of the 'developer' class.", 'duration': 491.286, 'highlights': ['Creation of Developer Class Inheriting from Employee Class', 'Implementation of Constructor for Developer Class', 'Testing the Developer Class Object Creation']}, {'end': 4129.274, 'start': 3802.934, 'title': 'Developer class inheritance', 'summary': 'Explores creating methods and accessing properties in the developer class, including demonstrating fixing bugs using c++, accessing properties of employee class, and addressing inheritance issues when asking for promotion.', 'duration': 326.34, 'highlights': ['Demonstrating fixing bugs using C++ by invoking the method D.fix_bug, with successful execution.', 'Addressing the issue of accessing properties of the employee class directly by moving the name property to the protected area, making it accessible from the derived class.', 'Exploring inheritance issues when asking for promotion and resolving the problem by making the inheritance public.']}, {'end': 4519.005, 'start': 4129.613, 'title': 'Inheritance and class creation', 'summary': 'Covers the implementation of inheritance and creation of derived classes in c++, demonstrating the creation of a teacher class inheriting from the employee class, with specific attributes and functionality, and resolving issues related to access modifiers and constructors.', 'duration': 389.392, 'highlights': ['Creation of a teacher class inheriting from the employee class', 'Implementation of specific attributes and functionality for the teacher class', 'Fixing issues with access modifiers and constructor implementation']}], 'duration': 1506.114, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix43012891.jpg', 'highlights': ['The chapter explains the implementation of an abstract class as a contract to enforce method implementation, demonstrating the concept of inheritance using the example of car classes.', 'Demonstrates the concept of inheritance using the example of car classes, explaining how derived classes, such as electric and conventional cars, inherit attributes and behaviors from the base class.', 'Explains the concept of inheritance, illustrating how a derived class inherits all the members of the base class and can have its own specific members, using the example of electric and conventional cars as specific types derived from the base class of car.', 'Creation of a teacher class inheriting from the employee class', 'Addressing the issue of accessing properties of the employee class directly by moving the name property to the protected area, making it accessible from the derived class.', 'Exploring inheritance issues when asking for promotion and resolving the problem by making the inheritance public.', 'Creation of Developer Class Inheriting from Employee Class', 'Implementation of specific attributes and functionality for the teacher class', 'Implementation of Constructor for Developer Class', 'Testing the Developer Class Object Creation', 'Fixing issues with access modifiers and constructor implementation', 'Demonstrating fixing bugs using C++ by invoking the method D.fix_bug, with successful execution.']}, {'end': 5423.859, 'segs': [{'end': 4548.926, 'src': 'embed', 'start': 4519.784, 'weight': 0, 'content': [{'end': 4523.367, 'text': 'okay, so that was the story of inheritance.', 'start': 4519.784, 'duration': 3.583}, {'end': 4533.035, 'text': 'we created two derived classes one is developer and the other one is teacher, and those two classes are inheriting from a class called employee,', 'start': 4523.367, 'duration': 9.668}, {'end': 4543.343, 'text': 'as you can see here and here, and we will be using these classes in our next example to explain our next concept, which is polymorphism.', 'start': 4533.035, 'duration': 10.308}, {'end': 4548.926, 'text': 'As I said, fourth principle of object-oriented programming is called polymorphism.', 'start': 4544.142, 'duration': 4.784}], 'summary': 'Two derived classes, developer and teacher, inherit from employee class, showcasing polymorphism in oop.', 'duration': 29.142, 'max_score': 4519.784, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44519784.jpg'}, {'end': 4616.006, 'src': 'heatmap', 'start': 4557.914, 'weight': 0.926, 'content': [{'end': 4563.659, 'text': 'So it is very simple, but only if you understand the things that I have explained so far in this course.', 'start': 4557.914, 'duration': 5.745}, {'end': 4568.779, 'text': 'So the first thing that I want to explain is what is polymorphism?', 'start': 4564.898, 'duration': 3.881}, {'end': 4576.742, 'text': 'The word itself comes from Greek language and it is a compound of poly and morph, which means many forms.', 'start': 4569.539, 'duration': 7.203}, {'end': 4584.744, 'text': 'And in programming, polymorphism describes the ability of an object or a method to have many forms.', 'start': 4577.242, 'duration': 7.502}, {'end': 4593.327, 'text': 'Now, the most common use of polymorphism in programming is when a parent class reference is used to refer to an object of a child class.', 'start': 4585.264, 'duration': 8.063}, {'end': 4596.89, 'text': 'Does that sound a little bit complex when I say it like that?', 'start': 4594.227, 'duration': 2.663}, {'end': 4599.332, 'text': 'I believe that it does, and I agree,', 'start': 4597.29, 'duration': 2.042}, {'end': 4606.158, 'text': 'but stick with me for a couple of minutes and let me show you how simple this really is on the example that we have here.', 'start': 4599.332, 'duration': 6.826}, {'end': 4611.663, 'text': "So in order to explain how polymorphism works, let's return to our employee class.", 'start': 4606.518, 'duration': 5.145}, {'end': 4616.006, 'text': "So this one here I'm going to collapse this.", 'start': 4612.364, 'duration': 3.642}], 'summary': 'Polymorphism is the ability of an object or method to have many forms, commonly used when a parent class reference is used to refer to an object of a child class.', 'duration': 58.092, 'max_score': 4557.914, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44557914.jpg'}, {'end': 4611.663, 'src': 'embed', 'start': 4585.264, 'weight': 1, 'content': [{'end': 4593.327, 'text': 'Now, the most common use of polymorphism in programming is when a parent class reference is used to refer to an object of a child class.', 'start': 4585.264, 'duration': 8.063}, {'end': 4596.89, 'text': 'Does that sound a little bit complex when I say it like that?', 'start': 4594.227, 'duration': 2.663}, {'end': 4599.332, 'text': 'I believe that it does, and I agree,', 'start': 4597.29, 'duration': 2.042}, {'end': 4606.158, 'text': 'but stick with me for a couple of minutes and let me show you how simple this really is on the example that we have here.', 'start': 4599.332, 'duration': 6.826}, {'end': 4611.663, 'text': "So in order to explain how polymorphism works, let's return to our employee class.", 'start': 4606.518, 'duration': 5.145}], 'summary': 'Polymorphism in programming refers to using a parent class reference to refer to a child class object, simplifying the concept with an example.', 'duration': 26.399, 'max_score': 4585.264, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44585264.jpg'}, {'end': 4705.186, 'src': 'embed', 'start': 4676.887, 'weight': 3, 'content': [{'end': 4681.891, 'text': 'And what I want to do is I want to invoke that do work method that I just implemented.', 'start': 4676.887, 'duration': 5.004}, {'end': 4688.077, 'text': 'And I want to invoke that method on this developer and teacher class because,', 'start': 4683.095, 'duration': 4.982}, {'end': 4693.56, 'text': 'considering the developer and teacher are inheriting from that employee class, we should be able to do that.', 'start': 4688.077, 'duration': 5.483}, {'end': 4705.186, 'text': "So if I say d.work and then t.work, let's see what will we get if I run this program.", 'start': 4694.04, 'duration': 11.146}], 'summary': 'Invoking do work method on developer and teacher class to test inheritance.', 'duration': 28.299, 'max_score': 4676.887, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44676887.jpg'}, {'end': 4983.655, 'src': 'embed', 'start': 4954.796, 'weight': 7, 'content': [{'end': 4956.097, 'text': 'And this here is the rule.', 'start': 4954.796, 'duration': 1.301}, {'end': 4966.668, 'text': 'So a pointer of base class, which is this here, can hold reference to derived class object, which is this part here.', 'start': 4956.198, 'duration': 10.47}, {'end': 4968.808, 'text': 'so that is just the rule.', 'start': 4966.668, 'duration': 2.14}, {'end': 4979.793, 'text': 'why? well, because this developer here, this developer, is deep down inside it, is an employee, because developer is inheriting from employee,', 'start': 4968.808, 'duration': 10.985}, {'end': 4983.655, 'text': 'as we already could see in the previous examples of this course.', 'start': 4979.793, 'duration': 3.862}], 'summary': 'A pointer of base class can hold reference to derived class object, due to inheritance.', 'duration': 28.859, 'max_score': 4954.796, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44954796.jpg'}, {'end': 5110.058, 'src': 'heatmap', 'start': 5044.87, 'weight': 0.744, 'content': [{'end': 5047.774, 'text': "And Jack is doing the same and he's a teacher and I'm a developer.", 'start': 5044.87, 'duration': 2.904}, {'end': 5050.858, 'text': 'So that means that this here does not work.', 'start': 5048.114, 'duration': 2.744}, {'end': 5056.983, 'text': 'But if you only knew how close we are to making this work,', 'start': 5051.559, 'duration': 5.424}, {'end': 5064.107, 'text': "you are literally missing only one tiny little thing that i didn't tell you to make this here work.", 'start': 5056.983, 'duration': 7.124}, {'end': 5066.809, 'text': 'so what that thing is?', 'start': 5064.107, 'duration': 2.702}, {'end': 5074.133, 'text': "well, let's return to our employee class and then here this work method.", 'start': 5066.809, 'duration': 7.324}, {'end': 5080.036, 'text': "let's make this work method virtual, so i'm going to say virtual here.", 'start': 5074.133, 'duration': 5.903}, {'end': 5082.337, 'text': "So let's run our program now.", 'start': 5080.796, 'duration': 1.541}, {'end': 5088.962, 'text': 'And as you can see, it says Saldina is writing C++ code and Jack is teaching history.', 'start': 5082.998, 'duration': 5.964}, {'end': 5090.243, 'text': 'So it works.', 'start': 5089.242, 'duration': 1.001}, {'end': 5093.591, 'text': 'Wait, I have to explain this.', 'start': 5092.11, 'duration': 1.481}, {'end': 5100.033, 'text': "Okay So let's return to our employee class to explain what just happened.", 'start': 5094.411, 'duration': 5.622}, {'end': 5104.315, 'text': 'Well, look at this function here, this virtual void function.', 'start': 5100.514, 'duration': 3.801}, {'end': 5110.058, 'text': 'This function with this virtual keyword is known as virtual function.', 'start': 5104.835, 'duration': 5.223}], 'summary': 'Developed program to make virtual function work, resulting in successful output.', 'duration': 65.188, 'max_score': 5044.87, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix45044870.jpg'}, {'end': 5139.695, 'src': 'embed', 'start': 5116.821, 'weight': 6, 'content': [{'end': 5126.206, 'text': 'can you please check if there is implementation of this function in my derived classes and if yes, please execute that instead.', 'start': 5116.821, 'duration': 9.385}, {'end': 5133.171, 'text': 'so what ends up happening is that the most derived version of this function here is going to be executed,', 'start': 5126.206, 'duration': 6.965}, {'end': 5139.695, 'text': 'and that is this function here for developer and then this function here for teacher.', 'start': 5133.171, 'duration': 6.524}], 'summary': 'Check for implementation in derived classes and execute most derived version of function.', 'duration': 22.874, 'max_score': 5116.821, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix45116821.jpg'}, {'end': 5268.28, 'src': 'embed', 'start': 5244.406, 'weight': 4, 'content': [{'end': 5254.814, 'text': 'so if we created more derived classes, which we could do, we could create, for example, derived class called bus driver or pilot, or singer or actor,', 'start': 5244.406, 'duration': 10.408}, {'end': 5256.875, 'text': 'doctor, and so on.', 'start': 5255.354, 'duration': 1.521}, {'end': 5261.497, 'text': 'And then we could keep objects of those derived classes like this.', 'start': 5257.355, 'duration': 4.142}, {'end': 5268.28, 'text': 'So we could reference them with this base class pointer because they would derive from employee as well.', 'start': 5261.597, 'duration': 6.683}], 'summary': 'Creating more derived classes like bus driver, pilot, singer, doctor, etc., from the base class employee.', 'duration': 23.874, 'max_score': 5244.406, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix45244406.jpg'}], 'start': 4519.784, 'title': 'Polymorphism in object-oriented programming', 'summary': 'Discusses the definition of polymorphism and its practical implementation in object-oriented programming, with a focus on inheritance and method overriding. it also explains how pointers and virtual functions in c++ relate to polymorphism and inheritance, with examples illustrating the execution of the most derived version of a function. the chapter also demonstrates how polymorphic behavior allows different types of employees to perform their tasks, showing how a base class pointer can reference objects of various derived classes, enabling a single line of code to trigger different types of employees to perform their respective jobs.', 'chapters': [{'end': 4898.887, 'start': 4519.784, 'title': 'Polymorphism in object-oriented programming', 'summary': 'Discusses the concept of polymorphism in object-oriented programming, explaining its definition and demonstrating its practical implementation through examples of inheritance and method overriding.', 'duration': 379.103, 'highlights': ['The chapter explains the concept of polymorphism and its practical implementation through examples of inheritance and method overriding, emphasizing the ability of an object or a method to have many forms.', 'The practical demonstration involves creating derived classes (developer and teacher) that inherit from a class called employee, showing how the work method can have different implementations in the derived classes.', 'The examples illustrate how a parent class reference is used to refer to objects of child classes, showcasing the most common use of polymorphism in programming.']}, {'end': 5116.821, 'start': 4899.407, 'title': 'Pointers and virtual functions in c++', 'summary': 'Explains how to use pointers to hold references to derived class objects and make virtual functions work, with an emphasis on the concept of inheritance and polymorphism in c++.', 'duration': 217.414, 'highlights': ['The concept of using pointers to hold references to derived class objects is explained, emphasizing the inheritance relationship and the ability to access members using a pointer.', "The significance of making the 'work' method in the 'employee' class virtual is highlighted, as it enables polymorphism and allows the program to display the specific work activities of the developer and teacher objects."]}, {'end': 5423.859, 'start': 5116.821, 'title': 'Understanding polymorphism in c++', 'summary': 'Illustrates the concept of polymorphism in c++ through inheritance, demonstrating how the most derived version of a function is executed, leading to polymorphic behavior, allowing different types of employees to perform their own tasks. the example shows how a base class pointer can reference objects of various derived classes, enabling a single line of code to trigger different types of employees to perform their respective jobs.', 'duration': 307.038, 'highlights': ['The most derived version of the function is executed, resulting in polymorphic behavior.', 'Base class pointer referencing various derived class objects enables triggering different types of employees to perform their respective jobs with a single line of code.', 'Demonstration of polymorphism through inheritance and the ability of different types of employees to perform their own tasks.']}], 'duration': 904.075, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wN0x9eZLix4/pics/wN0x9eZLix44519784.jpg', 'highlights': ['The practical demonstration involves creating derived classes (developer and teacher) that inherit from a class called employee, showing how the work method can have different implementations in the derived classes.', 'The chapter explains the concept of polymorphism and its practical implementation through examples of inheritance and method overriding, emphasizing the ability of an object or a method to have many forms.', 'The examples illustrate how a parent class reference is used to refer to objects of child classes, showcasing the most common use of polymorphism in programming.', "The significance of making the 'work' method in the 'employee' class virtual is highlighted, as it enables polymorphism and allows the program to display the specific work activities of the developer and teacher objects.", 'Base class pointer referencing various derived class objects enables triggering different types of employees to perform their respective jobs with a single line of code.', 'Demonstration of polymorphism through inheritance and the ability of different types of employees to perform their own tasks.', 'The most derived version of the function is executed, resulting in polymorphic behavior.', 'The concept of using pointers to hold references to derived class objects is explained, emphasizing the inheritance relationship and the ability to access members using a pointer.']}], 'highlights': ['The OOP course on Code Beauty YouTube channel covers beginner basic level and advanced concepts.', 'OOP is a programming paradigm for representing real-life entities with attributes and behaviors.', 'The chapter demonstrates the process of creating an employee class in C++ and adding attributes such as name, company, and age', 'Creating a custom constructor reduces the code in the main function to only two lines per employee.', 'Encapsulation is crucial in building secure and maintainable systems.', 'Utilizing abstract classes to simulate the behavior of interfaces from C# or Java.', 'The chapter explains the implementation of an abstract class as a contract to enforce method implementation, demonstrating the concept of inheritance using the example of car classes.', 'The practical demonstration involves creating derived classes (developer and teacher) that inherit from a class called employee, showing how the work method can have different implementations in the derived classes.', 'The chapter explains the concept of polymorphism and its practical implementation through examples of inheritance and method overriding, emphasizing the ability of an object or a method to have many forms.']}