OOP Using C++: Week 2 begins with how pointers and references work and then moves on to the advanced use of functions. It also presents arrays and collections
explores inheritance and polymorphism and ends with a discussion of special classes and friends. Sample listings
complete with sample output and an analysis of code
illustrate the topics of the day.
This course is for the beginning programmer or for the experienced programmer who wants to learn C++.
Product Code: CPPC02
After completing OOP Using C++: Week 2
the user should be able to:
|Create and use pointers and references|
|Overload member functions and overload operators|
|Declare and use arrays|
|Reuse and extend existing types through inheritance|
|Declare multiple inheritance and declare classes for virtual inheritance|
|Create abstract data types and implement pure virtual functions|
|Use static member variables and static member functions|
Day 8: Pointers
Shows how to declare and use pointers. Explains what the free store is and how to manipulate memory.
Day 9: References
Examines how references differ from pointers. Shows how to create references and use them. Identifies the limitations of references. Demonstrates how to pass values and objects into and out of functions by reference.
Day 10: Advanced Functions
Covers how to overload member functions and overload operators. Demonstrates how to write functions to support classes with dynamically allocated variables.
Day 11: Arrays
Discusses what arrays are and how to declare them. Explains what strings are and how to use character arrays to make them. Examines the relationship between arrays and pointers. Illustrates how to use pointer arithmetic with arrays.
Day 12: Inheritance
Explains what inheritance is. Shows how to derive one class from another. Tells what protected access is and how to use it. Discusses what virtual functions are.
Day 13: Polymorphism
Examines what multiple inheritance is and how to use it. Discusses virtual inheritance. Explains what abstract data types are. Covers what pure virtual functions are.
Day 14: Special Classes and Functions
Shows how to use static member variables and static member functions. Illustrates how to create and manipulate pointers to functions and pointers to member functions. Demonstrates how to work with arrays of pointers to functions.
Week 2 in Review
Presents a program that uses the skills learned during the week.
Provides reference tables for operator precedence
and binary and hexadecimal. Lists example programs.
This course includes the following materials:
|Files of sample program listings and answers to programming exercises|