This course is designed for C programmers and those that aspire to be users of the C++ programming language. It will allow participants to experiment with design features through exercise
programs. Starting with a presentation of C++ as a better C, the course explores function prototyping, the IOStream Library, and operators, references, default arguments, and structure types. The basis of data abstraction is the C++ class with the operator and function overloading. Once the features and syntax of the class construct in C++ are mastered, students are introduced to the methodology of object-oriented design and programming.
The application of these concepts will in turn lead to more advanced uses of C++, including inheritance, parameterization(template classes), and dynamic binding.
Example C++ programs and program fragments as well asassigned exercises augment the lecture material.
Introduction
Object- oriented fundamentals
- 5 Programming paradigms
- 5 Conquering complexity Maintenance
C++ Basics
- Built-in types, arrays and pointers
- Comments, keywords, I/O streams
- Built-in operators and control constructs
- Dynamic free store operators
- Safety in Electrical Maintenance
C++ Function
- Definition and prototypes
- Inline functions
Structures and references
Classes And Objects
Encapsulation
- Data members, member functions
- Private and public
Constructors and destructors
- Default arguments
- Storage allocation and deallocation
- This pointer
Overloading
Overloading Functions and Operators
- Unary and Binary operators
- Initialization vs. assignment
- Stream input and Output
Polymorphic Programming
Inheritance
- Public inheritance and subtyping
- Base and derived classes
- Constructors and destructors
- Base class initialization
Virtual functions
Base class Pointers and references
Dynamic binding
- Abstract base classes
- Pure Virtual functions.
Code Reuse In C++
Containment
- Objects as data members
- Member initialization
Private inheritance
- Base and derived relationship
- Access declarations.
Designing with C++
Templates
- Template functions & classes
- Exceptions
- Try, catch, throw
- Exception hierarchies