Overview
An intensive, 5-day, lecture-and-lab C++ and object-oriented programming course for practicing C (or other high-level language) programmers. C++ offers three major items beyond C, and each is discussed in reasonable technical detail in this course—enhancements to C that improve the process of writing programs, features for data abstraction and encapsulation that enable programmers to create new types, and capabilities for object-oriented programming with inheritance and polymorphism. The course clearly explains the C++ programming language and contains detailed walkthroughs of many C++ programs. Students become proficient in C++, understand the object-oriented paradigm, and participate in challenging hands-on laboratory assignments. Solutions are provided for the laboratory exercises. 60% lecture and 40% laboratory exercises. The course can be customized to the client’s specific needs at no additional charge.
Prerequisites
- Programming in C or another high-level language, or
Introduction
Review of C++ syntax and concepts presented in the following chapters of C++ How to Program, 6/e.
- Chapter 2—Introduction to C++ Programming
- Chapter 3—Introduction to Classes and Objects
- Chapter 4—Control Statements: Part 1
- Chapter 5—Control Statements: Part 2
- Chapter 6—Functions
- Chapter 7—Arrays
- Chapter 8—Pointers and Pointer-Based Strings
Classes: A Deeper Look, Part 1
- Time Class Case Study
- Class Scope and Accessing Class Members
- Separating Interface from Implementation
- Access Functions and Utility Functions
- Time Class Case Study: Constructors with Default Arguments
- Destructors
- When Constructors and Destructors Are Called
- Time Class Case Study: A Subtle Trap—Returning a Reference to a private Data Member
- Default Memberwise Assignment
Classes: A Deeper Look, Part 2
- 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
- Proxy Classes
Operator Overloading; String and Array Objects
- Fundamentals of Operator Overloading
- Restrictions on Operator Overloading
- Operator Functions as Class Members vs. Global Functions
- Overloading Stream Insertion and Stream Extraction Operators
- Overloading Unary Operators
- Overloading Binary Operators
- Case Study: Array Class
- Converting between Types
- Case Study: String Class
- Overloading ++ and --
- Case Study: A Date Class
- Standard Library Class string
- explicit Constructors
Object-Oriented Programming: Inheritance
- Base Classes and Derived Classes
- protected Members
- Relationship between Base Classes and Derived Classes
- Creating and Using a CommissionEmployee Class
- Creating a BasePlusCommissionEmployee Class Without Using Inheritance
- Creating a CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy
- CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy Using protected Data
- CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy Using private Data
- Constructors and Destructors in Derived Classes
- public, protected and private Inheritance
Object-Oriented Programming: Polymorphism
- Polymorphism Examples
- 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
- Summary of the Allowed Assignments Between Base-Class and Derived-Class Objects and Pointers
- Type Fields and switch Statements
- Abstract Classes and Pure virtual Functions
- Case Study: Payroll System Using Polymorphism
- Demonstrating Polymorphic Processing
- (Optional) Polymorphism, Virtual Functions and Dynamic Binding “Under the Hood”
- Case Study: Payroll System Using Polymorphism and Runtime Type Information with Downcasting, dynamic_cast, typeid and type_info
- Virtual Destructors
Templates
- Function Templates
- Overloading Function Templates
- Class Templates
- Nontype Parameters and Default Types for Class Templates
Exception Handling
- Exception-Handling Overview
- Example: Handling an Attempt to Divide by Zero
- When to Use Exception Handling
- Rethrowing an Exception
- Exception Specifications
- Processing Unexpected Exceptions
- Stack Unwinding
- Constructors, Destructors and Exception Handling
- Exceptions and Inheritance
- Processing new Failures
- Class auto_ptr and Dynamic Memory Allocation
- Standard Library Exception Hierarchy
File Processing
- Data Hierarchy
- Files and Streams
- Creating a Sequential File
- Reading Data from a Sequential File
- Updating Sequential Files
- Random-Access Files
- Creating a Random-Access File
- Writing Data Randomly to a Random-Access File
- Reading from a Random-Access File Sequentially
- Case Study: A Transaction-Processing Program
- Overview of Object Serialization
Standard Template Library (STL)
- Introduction to the Standard Template Library (STL)
- Introduction to Containers
- Introduction to Iterators
- Introduction to Algorithms
- Sequence Containers
- vector Sequence Container
- list Sequence Container
- deque Sequence Container
- Associative Containers
- multiset Associative Container
- set Associative Container
- multimap Associative Container
- map Associative Container
- Container Adapters
- stack Adapter
- queue Adapter
- priority_queue Adapter
- Algorithms
- fill, fill_n, generate and generate_n
- equal, mismatch and lexicographical_compare
- remove, remove_if, remove_copy and remove_copy_if
- Basic Searching and Sorting Algorithms
- copy_backward, merge, unique and reverse
- Set Operations
- Function Objects
Optional Object-Oriented Design (OOD) with the Unified Modeling Language (UML) Case Study
An optional topic for our object-oriented programming classes is our case study on object-oriented design using the UML in which we design and fully implement the software for a simple automated teller machine (ATM). We introduce a subset of the UML 2.0, then guide the reader through an end-to-end first object-oriented design and implementation experience which ends with a walkthrough of the complete code.
Price
- $12,995 lecture fee for up to 20 students maximum.
- Client purchases the books, at its own expense, directly from Pearson (the publisher) at the discounted Deitel rate.
- Instructor Travel Reimbursement (if travel is required).
Courses in the C++ Programming Curriculum
