Next:
List of Tables
Up:
Ceng 241 Advanced Programming
Previous:
Ceng 241 Advanced Programming
Contents
List of Tables
List of Figures
Introduction, Classes and Data Abstraction
History: The Rise and Decline of Structured Programming
The Problem - Complexity
Object-Oriented Programming (OOP)
Encapsulation
Inheritance
Polymorphism
Advantages of OOP
OOP Terminology
Other Object-Oriented Languages
Structure Definitions
Accessing Structure Members
Implementing a User-Defined Type Time with a struct
Implementing a Time Abstract Data Type with a class
Class Scope and Accessing Class Members
Separating Interface from Implementation
Controlling Access to Members
Access Functions and Utility Functions
Initializing Class Objects: Constructors
Using Default Arguments with Constructors
Destructors
When Constructors and Destructors Are Called
Using Set and Get Functions
Default Memberwise Assignment
Software Reusability
Classes Part II
const (Constant) Objects and const Member Functions
Composition: Objects as Members of Classes
friend Functions and friend Classes
Using the this Pointer
Dynamic Memory Management with Operators new and delete
static Class Members
Data Abstraction and Information Hiding
Example: Array Abstract Data Type
Example: String Abstract Data Type
Example: Queue Abstract Data Type
Container Classes and Iterators
Proxy Classes
Operator Overloading
Introduction
Fundamentals of Operator Overloading
Restrictions on Operator Overloading
Operator Functions As Class Members Vs. As Friend Functions
Overloading Stream-Insertion and Stream-Extraction Operators
Overloading Unary Operators
Overloading Binary Operators
Case Study: Array class
Converting between Types
Case Study: A String Class
Overloading ++ and -
Case Study: A Date Class
Standard Library Classes string and vector
Object-Oriented Programming: Inheritance
Introduction
Base Classes and Derived Classes
protected Members
Relationship between Base Classes and Derived Classes
Creating a Circle class without using inheritance
Point/Circle Hierarchy using Inheritance
Point/Circle Hierarchy using protected data
Point/Circle Hierarchy using private data
Case Study: Three-Level Inheritance Hierarchy
Constructors and Destructors in Derived Classes
"Uses A" and "Knows A" Relationships
public, protected and private Inheritance
Software Engineering with Inheritance
Object-Oriented Programming: Polymorphism
Introduction
Relationships Among Objects in an Inheritance Hierarchy
Invoking Base-Class Functions from Derived-Class Objects
Aiming Derived-Class Pointers at Base-Class Objects
Derived-Class Member-Function Calls via Base-Class Pointers
Virtual Functions
Polymorphism Examples
Type Fields and switch Structures
Abstract Classes
Case Study: Inheriting Interface and Implementation
Polymorphism, Virtual Functions and Dynamic Binding "Under the Hood"
Virtual Destructors
Case Study: Payroll System Using Polymorphism
Exception Handling
Introduction
Exception-Handling Overview
Other Error-Handling Techniques
Simple Exception-Handling Example: Divide by Zero
Rethrowing an Exception
2004-12-28