Software engineers, programmers, and analysts who will be designing and creating programs using C++. Anyone desiring the ability to read and understand C++ programs for maintenance and update purposes.
This course provides an intense introduction to C++ programming but the serious student will want to investigate other topics as well, such as object-oriented analysis and design (OOA&D), generic algorithms, and template metaprogramming.
Moving to C++
The Hello World
program
Using the string
Class
IO Using Streams
Standard Output Stream
Standard Input Stream
Formatted IO Using Streams
Manipulator IO Example
Another Manipulator IO Example
Stream Notes
C++ Comment Format
Changes in Functions
Function Prototypes
Function Definitions
Example: Calc.CPP
Constants - #define
vs. const
Overview of C++ Extensions to C
Declaration Placement
Default Function Arguments
Scope Resolution Operator
inline
Functions
Overloaded Functions
Examples of Using Overloading
C Linkage
Class Fundamentals
Classes
Standard C Structure
C++ Class vs. C Structure
Uses for a Class
Defining a Class
Example
Animal1.H
(Interface)
Animal1.CPP
(Implementation)
Main1.CPP
(Application)
C++ File Organization
Class Access Attributes
References vs. Pointers
Example: Refer1.CPP
Constructors and Destructors
Example
Animal2.H
(Interface)
Animal2.CPP
(Implementation)
Main2.CPP
(Application)
Member Access Functions
Operator Precedence
Scope in C++
new
and delete
Operators
Overloaded Member Functions
Example
Animal3.H
(Interface)
Animal3.CPP
(Implementation)
Main3.CPP
(Application)
Class Usage Tips
Object-Oriented Design
OOD Design and Development
System Structure
1. Be Broken Down Into Components
a. Information Hiding
b. What Should Be Hidden?
c. Advantages of Modularity
d. How Do We Modularize?
e. Modularization Clues
2. Have Limited Interactions
a. Cohesion
b. Coupling
3. Be Structured Hierarchically
Class Reorganization
Recap of the Major Steps in OOD
Identifying the Classes
Refine the Classes via Methods
Refine the Classes via Dependencies
Defining the Interface
Interface Definition Rule-of-Thumb
General Rules of Software Design and Development
Critical Items To Consider
Advanced Classes
Base Classes
Derived Classes
Inheritance
Construction and Destruction of Derived Classes
An Inheritance Example
Employee
and Boss
Access Control (private
, protected
, public
)
Private Member Information
Protected Member Information
Access to Base Classes
Multiple Inheritance
The friend
Keyword
Friend Functions
Friend Classes
Friendship Among Classes (not transitive nor associative)
Friends and Iterators
Example
Record.H
(Interface)
PhoneList.H
(Interface)
SLList.H
(Interface)
PhoneList.CPP
(Implementation)
PhoneMain.CPP
(Application)
Advanced Topics
Virtual Functions
Detailed Example
Virtual Classes
Detailed Example
Proper Design - Functional Separation
The static
Keyword
Static Data Members
Initializing and Using Static Data Members
Static Function Members
Pure Virtual Functions and Abstract Classes
Implementation Hiding
Operator Overloading
Example
Oper1.H
(Interface)
Oper1.CPP
(Implementation)
Understanding Templates
Upon completion of this course, the student will be able to:
Describe facilities of C++ that make a better C
Understand the concepts behind data hiding and encapsulation
Utilize the features of inheritance and polymorphism in program design
Understand how OOA&D can protect the programmer from implementation changes in other modules of an application
Apply object-oriented design techniques to real-world programming problems
Students are invited to bring their current ideas and questions to the classroom for discussion. Lecture, group problem solving, and online laboratories will be used. Students will be encouraged to enhance their skills utilizing the techniques presented through classroom problem solving and controlled online workshops. This course is approximately 50% labwork.
This course does not concentrate on the use of any one particular development tool. Instead, the students are encouraged to learn the proper design and implementation techniques by hand-coding their applications. If development tools are available in the classroom, the instructor will demonstrate their use and guide the students in the use of such tools.
Experience in C, Java, Pascal, or another compiled programming language with primitive data types is required. If you have any doubts about whether you meet this requirement, visit our Online C Language Review (see below).
This course can be offered as 5 days, with a single day of C language refresher and labs prepended. This refresher does not teach the entire C language, but will cover enough of the details for this C++ course to be completed. Example topics in the refresher include basic data types, loop constructs, background on pointers, user-defined data structures, and how to produce formatted output.
A selection of background questions is given below. Instructions for interpreting the results are given on the same page.
Background questions.