Slideshow

Intro & Adv. : C++ Programming

E-mail

Course Description:

C++ is the object oriented superset of ANSI C. This course provides students with a comprehensive study of the C++ Programming Language. The course stresses the object paradigm including classes, inheritance, virtual functions, and templates in the development of C++ programs. Lab exercises reinforce the lectures.

Who should attend this course?

Anybody who has the need to write programs in the C++ language including programmers, engineers, scientists, or other technical support personnel will benefit from this course.

Prerequisites:

Students should have taken the Introduction to C course or have equivalent knowledge.

Benefits of Attendance:

· Explain how object-oriented software engineering enhances the software development process.

· Identify the major elements in an object oriented programming language.

· Implement the concepts of data abstraction and encapsulation in the creation of abstract data types.

· Implement operator overloading.

· Use inheritance in C++.

· Select the proper class protection mechanism.

· Demonstrate the use of virtual functions to implement polymorphism.

· Write programs utilizing the I/O classes in C++.

· Understand some advanced features of C++ including templates, exceptions, and multiple inheritance.

· Compare the object vs the procedural approach to writing software.

· Use correct object oriented terminology.

· Define and use classes in a C++ program.

· Create and use abstract data types.

· Derive classes using inheritance in C++.

· Implement polymorphism by using virtual functions in a program.

· Differentiate between global functions, friend functions and member functions.

· Code their own memory management routines by overloading operators new and delete.

· Write classes and functions with parametrized types.

· Understand and handle exceptions in C++ programs.

· Disambiguate data and functions using multiple inheritance.

· Understand the difference between various kinds of inheritance.

· Use pointers to class member functions.

· Understand the C++ mechanism to resolve overloaded functions

Course Outline:

· Perspective

o The Software Crisis

o Design Techniques

o Large Software Systems

o Roots of Object Technology

o What Is Object-Oriented Programming?

o C++ and Object-Oriented Programming

o Why C++?

o Features of C++

o Pros and Cons of C++

· The Language of Object-Orientation

o What Is an Object?

o What Is a Class?

o Encapsulation

o Data Hiding

o The Public Interface

o Relationships Among Classes

o Inheritance

o Polymorphism

o Object-Oriented Design

· C vs. C++

o Comments

o Namespaces

o Simple Output

o Simple Input

o Definitions Near to First Use

o Function Prototypes

o The inline Specifier

o const

o Structure Members

o The Reference Type

o Overloading Function Names

o Default Parameters

o The Scope Resolution Operator

o Aggregates

o Operators new and delete

o The bool Data Type

o The string Data Type

· Fundamentals of Classes

o Data Types

o User Defined Data Types

o Using the Class Concept

o Defining a Class

o public and private Access Levels

o The Scope Resolution Operator ::

o Using Class Objects Like Built-in Types

o Scope

o Constructors

o Member Initialization Lists

o Destructors

o Array of Objects

o Pointers

o The this Pointer

o Passing Objects to Functions

o Returning Objects From Functions

o static Class Members

· Operator Overloading

o Introduction

o Rules for Operator Overloading

o Rationale for Operator Overloading

o Overloading Member Functions

o Overloading Non-Member Functions

o friend Functions

o The Copy Constructor

o The Assignment Operator

o Overloading [ ]

o Overloading Increment and Decrement Operators

o const Objects and References

· Composition of Classes

o Relationships

o Composition of Classes

o The Point Class

o The Line Class

o Member Initialization Lists

o An Application With Composition

o The Copy Constructor under Composition

o operator= under Composition

· Inheritance

o Introduction

o Public Base Classes

o The protected Access Level

o Member Initialization Lists

o What Isn’t Inherited

o Assignments Between Base and Derived Objects

o Compile-Time vs. Run-Time Binding

o virtual Functions

o Polymorphism

o virtual Destructors

o Pure virtual Functions

o Abstract Base Classes

o An Extended Inheritance Example

· I/O in C++

o The iostream Library

o Predefined Streams

o Overloading operator<<

o Overloading operator>>

o Manipulators

o Stream States

o Formatted I/O

o Disk Files

o Reading and Writing Objects

o Manipulators

o Writing Your Own Manipulators

o Overloading the I/O Operators

o Reading and Writing Objects

o Internal Transmission of Data

o A Spell Checker

o Handling Streams in the Constructor

· Advanced Topics

o Template Functions

o Template Classes

o Multiple Inheritance

o User-Defined Conversions

o Data Structures

o An Iterator Class

o Exceptions

· Introduction to the Standard Template Library

o Introduction

o The Standard Template Library

o Design Goals

o STL Components

o Iterators

o Example: vector

o Example: list

o Example: set

o Example: map

o Example: find

o Example: merge

o Example: accumulate

o Function Objects

o Adapters

· Parametrized Types - Templates

o Templates

o Overloading Functions

o Template Functions

o Specializing a Template Function

o Disambiguation Under Specialization

o Template Classes

o Instantiating a Template Class Object

o Rules for Template Classes

o A Non-Member Function with a Template Argument

o Friends of Template Classes

o Templates with Multiple Type Parameters

o Comments Regarding Templates

· Relationships of all Kinds

o Uses of Member Initialization Lists

o Member Initialization Lists Under Composition

o Initialization Lists Under Inheritance

o Initialization Lists With Multiple Inheritance

o Initialization Lists with Multiple Inheritance and Composition

o Efficiency

o operator= and Composition

o Constructors and Composition

o What is not Inherited?

o operator=, Construction, and Inheritance

o Public Inheritance

o virtual Functions

o A Shape Class Hierarchy

o Polymorphism

o Pure Virtual Functions

o Abstract Base Classes

o Private Inheritance

o using Relationships

o Associations

· Multiple Inheritance (MI)

o Multiple Inheritance

o Ambiguities

o virtual Base Classes

o The Dominance Rule

o Member Initialization Lists

o operator=

· Data Structures

o Introduction

o A Simple List

o Layering Type-safe Classes Upon List

o A template List Class

o Iterators

o A template Iterator

o Stack and Queue Classes

o Templates and Inheritance

· Function Pointers

o Why Have Function Pointers?

o Passing Functions as Arguments

o Registering Functions

o Function Pointers in C++

o Callback Functions

o A Class with a Callback Object

o Registration of Exception Handlers

· Exceptions

o What Are Exceptions?

o Traditional Approaches to Error Handling

o try, catch, and throw

o A Simple Exception Handler

o Multiple catch Blocks

o The Exception Specification List

o Rethrowing an Exception

o Cleanup

o Exception Matching

o Inheritance and Exceptions

o Resource Allocation

o Constructors and Exceptions

o Destructors and Exceptions

o Catch by Reference

o Standard Exceptions

· Disambiguation

o Conversion

o int Conversion

o float + double Conversions

o Arithmetic and Pointer Conversion

o Inheritance Based Conversion

o Overloaded Functions

o Exact Match

o Match with Promotion

o Match with Standard Conversion

o User Defined Conversion

o Constructors as Conversion Operators

o Ambiguities

· Miscellaneous Topics

o Namespaces

o Use Counts

o Reference Counts

o RTTI

o Casts

o Having a Limited Number of Objects

o Smart Pointers

Share this page!