Description
This course builds upon the experience of the participant
to make the transition into C++. Examples in C++ are related to how they
would be coded in other procedural languages. Unique features of C++ are
introduced after the participant has become familiar with programming
in the language.
The course offers a mix of lecture and hands-on
exercises. It is a moderately-paced course that covers most of the features
of the language. The series of workshops develop a simple program into
a modular multi-function program.
This class assumes the student has programmed in
another language for a few years.
Objectives
By the end of the course you will be able to:
- Write a C++ program
- Create a C++ object with data and function members
- Appreciate the strengths and weaknesses of C++
Outline
- General Program Structure
- Program Layout
- Coding Conventions
- Compiling and running a program
- Variables
- Naming
- Data types
- Storage Classes
- Operators
- Precedence and associativity
- Data type conversions
- Control Flow
- If statement
- While and do-while loops
- For loop
- Switch statement
- Break and continue
- Library and user-written functions
- Function definition
- Function call and argument passing
- Standard library I/O functions
- Compound variables
- Arrays and strings
- Structures and classes
- Pointer Variables
- Definition and use
- Structure and union pointers
- Preprocessor Language
- Macro definitions
- Conditional compilation
- Object Oriented Programming
- Data and function abstraction
- Abstract data types
- Classes
- Data members
- Function members
- Object Initialization - Constructors
- Object Cleanup - Destructors
- Default operations - copy constructor and
assignment
- Functions
- Call by value and call by reference
- Function overloading
- Default arguments
- Operator functions and overloading
- Friend functions
- Inline functions
- Encapsulation
- Public, Private, Protected Inheritance
- Scope of names
- Resolution operator ::
- Input and Output Library
- iostreams
- cout << operator
- cin >> operator
|