课程: Complete Guide to C++ Programming Foundations
免费学习该课程!
今天就开通帐号,24,100 门业界名师课程任您挑!
Elements of object-oriented programming - C++教程
课程: Complete Guide to C++ Programming Foundations
Elements of object-oriented programming
- [Instructor] C++ is not an extension of the C programming language. There are actually several differences between the two languages, and we can't assure that one completely contains the other. The main difference is that C++ is an object-oriented programming language. So let's briefly go through some of the basic elements of object-oriented programming. First, we have modeling. A model is a representation of a thing or concept in reality. Modeling is a crucial part of object-oriented programming. We may model anything, a cow, a car, a person, you name it. Now the tricky part is choosing which elements to include in your models. For example, let's suppose we want to model a house. We might include variables to represent every aspect of a house we could think of like size, number of rooms, location, age, color, owner, and so on. You may agree with me that there are countless aspects we could add to our model, so we may never finish our model of a house. Thus, the challenge of…