13.1 — Welcome to object-oriented programming – Learn C++
Back in lesson 1.3 -- Introduction to objects and variables, we defined an object in C++ as, “a piece of memory that can be used to store values”. An object with a name is called a variable. In traditional programming (what we’ve been doing prior to this point), programs are basically lists of instructions to the computer that define data (via objects) and then work with that data (via statements and functions). Data and the functions that work on that data are separate entities that are combined together to produce the desired result. Because of this separation, traditional programming often does not provide a very intuitive representation of reality. It’s up to the programmer to manage and connect the properties (variables) to the behaviors (functions) in an appropriate manner. This leads to code that looks like this: So what is object-oriented programming? As with many things, it is perhaps understood most easily through use of an analogy. Take a look around you -- everywhere you lo
Procedural programming Back in lesson 1.3 -- Introduction to objects and variables , we defined an object in C++ as, “a piece of memory that can be used to store values”. An object with a name is called a variable. Our C++ programs have consisted of sequential lists of instructions to the computer that define data (via objects) and operations performed on that data (via functions containing statements and expressions). Up to now, we’ve been doing a type of programming called procedural programming. In procedural programming , the focus is on creating “procedures” (which in C++ are called funct
Explore this link on the map →related reading
- how I think when I think about programming - alice mazalicemaz.com
- LEAP 71 | PicoGK.org Blogpicogk.org
- CS106B Object-Oriented Programmingweb.stanford.edu
- Object-oriented programming - Learn web development | MDNdeveloper.mozilla.org
- LEAP 71 | PicoGK.org Blogpicogk.org
- Object-Oriented Programming (OOP) in Python – Real Pythonrealpython.com
- Learnable Programmingworrydream.com
- 4. Encapsulation - CS2030S Programming Methodology IInus-cs2030s.github.io
- LEAP 71 | PicoGK.org Blogpicogk.org
- Structure and Interpretation of Computer Programsmitp-content-server.mit.edu
- 9. Classes — Python 3.14.6 documentationdocs.python.org
- Immutable object - Wikipediaen.wikipedia.org