QUESTIONS AND CORRECT ANSWERS
Object-oriented programming - CORRECT ANSWER A style of programming focused on the
use of classes and class hierarchies
Polymorphism - CORRECT ANSWER The provision of a single interface to multiple derived
classes, enabling the same method call to invoke different derived methods to generate different
results
Inheritance - CORRECT ANSWER Reuse and extension of fields and method implementations
from another class
Encapsulation - CORRECT ANSWER Bundling data and code into a restricted container
Abstraction - CORRECT ANSWER Specifying a general interface while hiding implementation
details (sometimes listed as a4th fundamental concept of OOP, though I believe it's common to most
paradigms)
Primitive type - CORRECT ANSWER A data type that can typically be handled directly by the
underlying hardware
Enumerated type - CORRECT ANSWER A data type consisting of a fixed set of constant
values called enumerators (C++has both enum and enum class)
Class - CORRECT ANSWER A template encapsulating data and code that manipulates it (C++
also has struct, which isidentical other than default visibility)
Instance - CORRECT ANSWER An encapsulated bundle of data and code (e.g., an instance of
a program is a process; aninstance of a class is an object)
Object - CORRECT ANSWER An instance of a class containing a set of encapsulated data and
associated methods
, Variable - CORRECT ANSWER A block of memory associated with a symbolic name that
contains an object instance or aprimitive data value
Operator - CORRECT ANSWER A short string representing a mathematical, logical, or
machine control action
Attribute - CORRECT ANSWER A class member variable
Constructor - CORRECT ANSWER A special class member that creates and initializes an
object from the class
Destructor - CORRECT ANSWER A special class member that cleans up when an object is
deleted
Method - CORRECT ANSWER A function that manipulates data in a class
Friend - CORRECT ANSWER A class or a function (NOT a method!) That is granted access to
its friend class' privatemembers
Operator Overloading - CORRECT ANSWER Providing a user-defined meaning to a pre-
defined operator (e.g., +, ==, <<) fora user-defined type (e.g., a class)
Getter - CORRECT ANSWER A method that returns the value of a private variable
Setter - CORRECT ANSWER A method that changes the value of a private variable
Multiple Inheritance - CORRECT ANSWER A derived class inheriting class members from
two or more base classes
Base Class - CORRECT ANSWER The class from which members are inherited