![]() |
C++ Programming for C Programmers
| Duration: 5 days |
| Participants: Technical users, applications programmers, and systems programmers. |
|
Objectives:
Upon successful completion of this course you will be able to:
- Distinguish new C++ Language features not available in C Language. - Compile and execute C++ programs. - Define encapsulation, inheritance, and polymorphism. - Use inline functions and function overloading. - Create data abstractions through the use of classes. - Share and restrict object members. - Define and use constructors and destructors. - Dynamically create and destroy space. - Use the I/O Stream related classes. - Use operator overloading. - Declare and use named constants. - Describe scope, storage class, and linkage. - Increase software reusability through inheritance. - Use dynamic binding and virtual functions. - Declare and use class and function templates (Optional and is only presented if time permits.) |
| Overview: This course provides experienced C Language programmers with the skill to create object oriented programs using the C++ programming language. Participants will learn the syntax of the language, as well as how to code and execute object oriented C++ programs. This |
|
Prerequisites:
- Completion of a Programming in C Language course or a working knowledge of the C Programming Language. - Knowledge of one of the program editors for the development environment used for the exercise sessions. - An understanding of object oriented programming concepts would be helpful. |
| Format: Lecture and discussion with hands-on exercises. |
|
Topic Outline:
- Introduction Features of C++ History and Origin of C++ Advantages of C++ C++ Compilation Process - C++ vs. C Compatibility between C and C++ Comments and Readability C++ Keywords and Modifiers Variable Declarations in C++ Derived Data Types Operator Precedence and Associativity Scope/Global Operator (::) Namespaces Input/Output Streams - Functions Function Definition Function Declaration Reference Parameters Default Argument Values Function Overloading Inline Functions Type Safe Linkage Name Mangling Combining C and C++ Functions - Object Oriented Concepts Features of Object Oriented Languages Procedural vs. Object Oriented Data Abstraction Encapsulation Inheritance Polymorphism Effects of OO Approach Basic OO Design (CRC Cards) - Classes and Encapsulation Definition of Class Class Syntax Class Data Members Class Member Functions Internal External Private vs. Public Members - Constructors and Destructors Class Constructors Constructors with Parameters Overloaded Constructors Internal and External Constructors Explicit and Implicit Constructor Invocation Class Destructors Dynamic Memory Allocation new Operator delete Operator Pointers to Classes this Pointer Function and Class Friends Copy Constructors Avoiding Memory Leaks - I/O Streams Standard I/O Streams Reading Input with cin Writing Output with cout Writing Errors with cerr Other I/O Class Member Functions get put write Manipulators Simple File I/O Opening File Streams State Checking Member Functions Closing File Streams - Overloading Operators Overloading Operators Operator Overloading Rules and Restrictions Valid Overloaded Operators Overloading Binary Operators Overloading Unary Operators Overloading Operators Having Side Effects Overloading Assignment Operator Overloading ++ and -- Operators Overloading Type Cast (conversion) Operator Friend Operator Functions Non-Member Operator Functions - Constants, Scope, and Linkage Named Constants Pointers and Constants References and Constants Functions and Constants Constant Member Functions Logically Constant Functions mutable Keyword Scope and Storage Class Linkage static Class Members - Inheritance Software Reusability Inheritance - Concept and Terminology Inheritance Syntax Uses and Advantages Base and Derived Classes Class Access Specifiers public private protected Single Inheritance Multiple Inheritance Constructors and Destructors Containment - Polymorphism and Dynamic Binding Polymorphism Definition Types of Binding Static Dynamic Virtual Functions Rules for Dynamic Binding Pure Virtual Functions and Abstract Classes - Class and Function Templates (Optional - If time permits.) Template Definition Template Container Class Syntax Template Arguments Overriding Template Definition Global Function Templates Syntax Use Advanced Template Topics Special Template Functions Inherited Template Classes |
|
|