Lecture 7 - Introduction to OOP Flashcards
logical blueprint of an object
class
created based on an accepted
blueprint
object
objects can be created from a
class
object-oriented programming
any valid C++ identifier. By convention, the name starts with a capital letter, and a camel back (camel case) notation is observed if compound names are used.
Class Name
data/function is only accessible inside the class.
private
defines the visibility of the data and functions
Access specifier
data/function is accessible outside the class.
public
variables which represent the attributes of the class
Data_members
specify the class name (ClassName) followed by the object name (objectName).
create an object of a class
used for dynamic memory allocation. size is flexible and can be used to allocate space during runtime.
Heap Memory
data/function is accessible inside the class and any of its subclasses
protected
functions which represent the behaviors of the class
Member_functions
class member used to instantiate an object. initializes the data members to their default values.
constructor
use the dot operator/syntax “.” on the object (objectName).
access the class attributes (classMember)
any physical device capable of storing information
Computer memory
class member used to deallocate memory when the object is already out of scope.
destructor
used for static memory allocation and access to this memory area is very fast.
Stack Memory
portion of primary memory (RAM) where function calls
including local variables, are stored.
Stack