- Protects from accidental corruption.
- makes it easier for others to use code without knowing specifics.
Back
Instantiation
Front
- Instantiation is defining a class object (an object is an instance).
Back
Procedural Prog. vs OOP
Front
- Procedural focuses on functions.
- OOP focuses on using "objects" which consist of functions and data. (attributes and actions).
Back
Text files
Front
- Data is converted into characters and sent to the file.
- uses: cin >> , (or getline); and cout << .
- humans can read (pro and con).
Back
Binary files
Front
- Data is written without any conversion to characters (an exact duplicate of what is in RAM).
- uses: read/write.
- humans can not read (pro and con).
- Only option for images and audio.
- Store and search large amounts of data faster and easier.
Back
Encapsulation
Front
- Combining data and code in a single object.
Back
what does it mean to make code "reusable"?
Front
- Code can be used by many people in many applications.
Back
runtime stack
Front
The stack of order of function calls. (call adds function to stack, return removes it from stack)
Back
object vs instance
Front
- They are the same thing...
Back
Array of structs (ex.)
Front
- structName arrayName[size];
Back
Getter
Front
- function that returns private data for use outside the class.
Back
Inheritance
Front
- "Is a" relationship.
- A square "IS A" rectangle.
- you can substitute the child class for a parent class in functions.
- Private stays Private, Protected is shared with derived classes.
Back
Class
Front
- A class is like a blueprint for an object.
- consist of functions and data.
Back
Setter
Front
- Function that changes private data withing a class.
Back
Instance data
Front
- Data from a specific object, located inside the class.
Back
Array of pointers to structs (ex.)
Front
- sturctName *arrayName[size];
Back
Aggregation
Front
- "Has a" relationship.
- A car "HAS A" engine.
- private stays private.