Please enable JavaScript.
Coggle requires JavaScript to display documents.
MM07 - Coggle Diagram
MM07
Chapter 24
Converting to Base Classes
Implicit conversion
assigning derived class
object to base class object
Assignments and function calls
Type Conversions in Assignments
copies only base class members
base class object to derived class object (not allowed)
Converting References and Pointers
: limited access to public members of base class
Explicit Type Conversions
Upcasts (safe, implicit)
Downcasts
(unsafe, requires explicit cast)
Using static_cast operator
Safety issues
Chapter 28
Traditional Error Handling
Error checking after leaving a function
Using return values to indicate errors
Using global error variables or flags
Exception Handling Concept
Separating normal program flow from error handling
Throwing exceptions to transfer control to the calling environment
Catching exceptions to handle errors centrally
Exception Classes
custom exception classes to categorize errors
provide more specific error information
Exception Handlers
try
catch
Chapter 23
Is-a relationship
Base classes and derived classes
Defining a derived class
Members of Derived Classes
Data members and methods
Public interface
Member Access
Access to additional members
Access to private members of the base class
Name lookup
Direct and indirect derivation
Access to public members in the base class
Access to private members of the base class
Data abstraction and reusability