Inheritance - Answers
Single inheritance - Answers enables a derived class to inherit properties and behavior from a single
parent class.
Multiple inheritance - Answers When a class is derived from multiple base classes
Multi-level inheritance - Answers
Hybrid inheritance - Answers Use of multiple types of inheritance
Function overloading - Answers The ability of two functions with the same name but different
parameters to exist in the same program or class.
Templates - Answers A formula or blueprint for creating a generic class or a function
Function of a constructor - Answers Initializes an object
Object - Answers instance of a class
Function of Destructor - Answers To free the memory consumed by program
Polymorphism - Answers The ability of a variable, variable or object to take on multiple forms
Enum - Answers
Difference between structure and union - Answers Union is more memory centric
Exception - Answers error condition that can occur during the normal course of program execution;
exception is thrown
Try Catch Block - Answers An exception handling process in programming where possible error
generating situations are smoothly handled during execution, with the situation is enclosed inside the
try section, and one or more catches are built in to handle the possible errors that may occur. This is a
key feature in making very large programs robust and error free.
Handling of runtime error - Answers Exception handling
inline function - Answers Member functions defined inside the integration of the class
A-D-T - Answers Abstract Data Type. It's a type of secondary or derived data type
Abstraction - Answers A definiton that captures general characteristics
Procedural Programming (POP) - Answers uses variables to store data, focuses on the process/functions
that occur in a program. Data and functions are seperate and distinct
, Object-oriented programming (OOP) - Answers Based on objects that encapsulate the data and the
functions that operate on and with the data
:: - Answers Scope resolution operator (not overloadable)
Syntax resolution operator syntax - Answers Class-name <scope resolution> object name
Why use Object Oriented Programming? - Answers To solve and avoid the problem with data security in
POP
Object - Answers Software entity that combines data and functions that act on the data in a single unit
Attributes - Answers The data items of an object in member variable should
Class - Answers a programmer-defined data type
Member functions (methods) - Answers procedures/functions that act on the attributes of the class
Data hiding - Answers Restricting data access to certain members of an object. The intent is to allow only
member functions to directly access and modify the object's data
Encapsulation - Answers The building of a object's data and procedures into a single entity.
Access specifier - Answers Used to control accesst to members of the class
Member functions - Answers Accessor, mutator
Standard structure of a program - Answers 1. Interface - all prototypes and header files
2. Implementation - all function definitions
3. Client-code - main.cpp
Standard structure of an OOP program - Answers 1. Class specification file - class.h
2. Class implementation file - class.cpp
3. Client-code file - main.cpp
Use of scope resolution operator (::) - Answers data-type class-name :: member-function(){
//function definition ;
}
used in class implementation file
Class conventions - Answers 1. member variables are private