Core C++ - Professional Training for Developers
The course objective is to give the students a stable basis of knowledge and skills for working as a C++ software engineer for the GNU Linux platform. The course covers the minimal set of knowledge and skills that a C++ developer should have: C++ language, object-oriented programming, standard C++ APIs (STL), XML, as well as software engineering. The course targets the gcc compiler for Linux and Eclipse CDT as development IDE.
1. Introduction to Programming with C++
1.1. Core C++ Course Overview (lectures: 1, exercises: 0)
- Course scope, curriculum, exams, lectures, exercises
1.2. Introduction to Computers, Computer Programming and C++ (lectures: 3, exercises: 0)
- What Is a Computer?
- Computer Organization
- Early Operating Systems
- Personal, Distributed and Client/Server Computing
- The Internet and the World Wide Web
- Machine Languages, Assembly Languages and High-Level Languages
- History of C and C++
- C++ Standard Library
- Key Software Trend: Object Technology
- Typical C++ Development Environment
- Test-Driving a C++ Application
- Software Engineering Case Study: Introduction to Object Technology and the UML
1.3. Introduction to C++ Programming (lectures: 3, exercises: 2)
- First Program in C++: Printing a Line of Text
- Modifying Our First C++ Program
- Another C++ Program: Adding Integers
- Memory Concepts
- Arithmetic
- Decision Making: Equality and Relational Operators
- Software Engineering Case Study: Examining the ATM Requirements Document
1.4. Introduction to Classes and Objects (lectures: 3, exercises: 2)
- Classes, Objects, Member Functions and Data Members
- Defining a Class with a Member Function
- Defining a Member Function with a Parameter
- Data Members, set Functions and get Functions
- Initializing Objects with Constructors
- Placing a Class in a Separate File for Reusability
- Separating Interface from Implementation
- Validating Data with set Functions
- Software Engineering Case Study: Identifying the Classes in the ATM Requirements Document
1.5. Control Statements: Part 1 (lectures: 3, exercises: 2)
- Algorithms
- Pseudocode
- Control Structures
- if Selection Statement
- if…else Double-Selection Statement
- while Repetition Statement
- Formulating Algorithms: Counter-Controlled Repetition
- Formulating Algorithms: Sentinel-Controlled Repetition
- Formulating Algorithms: Nested Control Statements
- Assignment Operators
- Increment and Decrement Operators
- Software Engineering Case Study: Identifying Class Attributes in the ATM System
1.6. Control Statements: Part 2 (lectures: 3, exercises: 2)
- Essentials of Counter-Controlled Repetition
- for Repetition Statement
- Examples Using the for Statement
- do…while Repetition Statement
- switch Multiple-Selection Statement
- break and continue Statements
- Logical Operators
- Confusing Equality (==) and Assignment (=) Operators
- Structured Programming Summary
- Software Engineering Case Study: Identifying Objects’ States and Activities in the ATM System
1.7. Functions and an Introduction to Recursion: Part 1 (lectures: 3, exercises: 2)
- Program Components in C++
- Math Library Functions
- Function Definitions with Multiple Parameters
- Function Prototypes and Argument Coercion
- C++ Standard Library Header Files
- Case Study: Random Number Generation
- Case Study: Game of Chance and Introducing enum
- Storage Classes
- Scope Rules
- Function Call Stack and Activation Records
- Functions with Empty Parameter Lists
1.8. Functions and an Introduction to Recursion: Part 2 (lectures: 2, exercises: 2)
- Inline Functions
- References and Reference Parameters
- Default Arguments
- Unary Scope Resolution Operator
- Function Overloading
- Function Templates
- Recursion
- Example Using Recursion: Fibonacci Series
- Recursion vs. Iteration
- Software Engineering Case Study: Identifying Class Operations in the ATM System
1.9. Arrays and Vectors (lectures: 4, exercises: 4)
- Arrays
- Declaring Arrays
- Examples Using Arrays
- Passing Arrays to Functions
- Case Study: Class GradeBook Using an Array to Store Grades
- Searching Arrays with Linear Search
- Sorting Arrays with Insertion Sort
- Multidimensional Arrays
- Case Study: Class GradeBook Using a Two-Dimensional Array
- Introduction to C++ Standard Library Class Template vector
- Software Engineering Case Study: Collaboration Among Objects in the ATM System
1.10. Pointers and Pointer-Based Strings (lectures: 4, exercises: 6)
- Pointer Variable Declarations and Initialization
- Pointer Operators
- Passing Arguments to Functions by Reference with Pointers
- Using const with Pointers
- Selection Sort Using Pass-by-Reference
- sizeof Operators
- Pointer Expressions and Pointer Arithmetic
- Relationship Between Pointers and Arrays
- Arrays of Pointers
- Case Study: Card Shuffling and Dealing Simulation
- Function Pointers
- Introduction to Pointer-Based String Processing
- Fundamentals of Characters and Pointer-Based Strings
- String Manipulation Functions of the String-Handling Library
Intermediate Exam #1 (problems: 4, check-up: 2)
- 3 practical problems (70% required to pass)
2. Object-Oriented Programming with C++
2.1. Object-Oriented Programming Concepts (lectures: 3, exercises: 0)
- Object-Oriented Programming and Design Fundamentals
- Classes, Objects, Encapsulation, Inheritance, Polymorphism
2.2. Classes: A Deeper Look, Part 1 (lectures: 3, exercises: 4)
- Time Class Case Study
- Using #define, #ifndef and #endnf preprocessor directives
- Class Scope and Accessing Class Members
- Separating Interface from Implementation
- Access Functions and Utility Functions
- Time Class Case Study: Constructors with Default Arguments
- Destructors
- When Constructors and Destructors Are Called?
- Time Class Case Study: A Subtle Trap
- Returning a Reference to a private Data Member
- Default Memberwise Assignment
- Software Reusability
- Software Engineering Case Study: Starting to Program the Classes of the ATM System
2.3. Classes: A Deeper Look, Part 2 (lectures: 4, exercises: 4)
- const (Constant) Objects and const Member Functions
- Composition: Objects as Members of Classes - friend Functions and friend Classes
- Using the this Pointer
- Dynamic Memory Management with Operators new and delete
- static Class Members
- Data Abstraction and Information Hiding
- Example: Array Abstract Data Type
- Example: String Abstract Data Type
- Example: Queue Abstract Data Type
- Container Classes and Iterators
- Proxy Classes
2.4. Operator Overloading (lectures: 4, exercises: 4)
- Fundamentals of Operator Overloading
- Restrictions on Operator Overloading
- Operator Functions as Class Members vs. Global Functions
- Overloading Stream Insertion and Stream Extraction Operators
- Overloading Unary Operators
- Overloading Binary Operators
- Case Study: Array Class
- Converting between Types
- Case Study: String Class
- Overloading ++ and - -
- Case Study: A Date Class
- Standard Library Class string
- explicit Constructors
2.5. Object-Oriented Programming: Inheritance (lectures: 3, exercises: 3)
- Base Classes and Derived Classes
- protected Members
- Relationship between Base Classes and Derived Classes
- Creating and Using a CommissionEmployee Class
- Creating a BasePlusCommissionEmployee Class Without Using Inheritance
- Creating a CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy
- CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy Using protected Data
- CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy Using private Data - Constructors and Destructors in Derived Classes
- public, protected and private Inheritance
- Software Engineering with Inheritance
2.6. Object-Oriented Programming: Polymorphism (lectures: 4, exercises: 4)
- Polymorphism Examples
- Relationships Among Objects in an Inheritance Hierarchy
- Invoking Base-Class Functions from Derived-Class Objects
- Aiming Derived-Class Pointers at Base-Class Objects
- Derived-Class Member-Function Calls via Base-Class Pointers
- Virtual Functions
- Summary of the Allowed Assignments Between Base-Class and Derived-Class Objects and Pointers
- Type Fields and switch Statements
- Abstract Classes and Pure virtual Functions
2.7. Templates (lectures: 1, exercises: 3)
- Function Templates
- Overloading Function Templates
- Class Templates
- Nontype Parameters and Default Types for Class Templates
- Notes on Templates and Inheritance
- Notes on Templates and Friends
- Notes on Templates and static Members
2.8. Formatted Input/Output (lectures: 1, exercises: 2)
- Formatting Output with printf
- Printing Integers
- Printing Floating-Point Numbers
- Printing Strings and Characters
- Other Conversion Specifiers
- Printing with Field Widths and Precisions
- Using Flags in the printf Format-Control String
- Printing Literals and Escape Sequences
- Formatting Input with scanf
- Using sprintf and sscanf
2.9. Stream Input/Output (lectures: 3, exercises: 4)
- Streams: Classic Streams vs. Standard Streams
- iostream Library Header Files
- Stream Input/Output Classes and Objects
- Stream Output: Output of char* Variables, Character Output using Member Function put
- Stream Input: get and getline, istream, peek, putback and ignore
- Unformatted I/O using read, write and gcount
- Stream Manipulators: dec, oct, hex and setbase, precision, setprecision, width, setw
- Stream Format States and Stream Manipulators: showpoint, left, right, internal, fill, setfill, dec, oct, hex, showbase, scientific, fixed, uppercase, boolalpha, flags
- Stream Error States
- Tying an Output Stream to an Input Stream
2.10. Exception Handling (lectures: 3, exercises: 2)
- Exception-Handling Overview
- Example: Handling an Attempt to Divide by Zero
- When to Use Exception Handling
- Rethrowing an Exception
- Exception Specifications
- Processing Unexpected Exceptions
- Stack Unwinding
- Constructors, Destructors and Exception Handling
- Exceptions and Inheritance
- Processing new Failures
- Class auto_ptr and Dynamic Memory Allocation
- Standard Library Exception Hierarchy
- Other Error-Handling Techniques
2.11. File Processing (lectures: 2, exercises: 4)
- The Data Hierarchy
- Files and Streams
- Creating a Sequential File
- Reading Data from a Sequential File
- Updating Sequential Files
- Random-Access Files
- Creating a Random-Access File
- Writing Data Randomly to a Random-Access File
- Reading from a Random-Access File Sequentially
- Case Study: A Transaction-Processing Program
- Input/Output of Objects
2.12. Class string and String Stream Processing (lectures: 2, exercises: 3)
- string Assignment and Concatenation
- Comparing strings
- Substrings
- Swapping strings
- string Characteristics
- Finding Strings and Characters in a string
- Replacing Characters in a string
- Inserting Characters into a string
- Conversion to C-Style char * Strings
- Iterators
- String Stream Processing
2.13. Regular Expressions (lectures: 1, exercises: 2)
- The regular expressions language - literals and meta-characters, character classes, quantifiers, grouping characters, etc.
- Regular expressions in C++
- Searching, extracting, validating, splitting and replacing text by regular expressions
2.14. The Preprocessor (lectures: 1, exercises: 1)
- The #include Preprocessor Directive
- The #define Preprocessor Directive: Symbolic Constants
- The #define Preprocessor Directive: Macros
- Conditional Compilation
- The #error and #pragma Preprocessor Directives
- The # and ## Operators
- Line Numbers
- Predefined Symbolic Constants
- Assertions
Intermediate Exam #2 (problems: 4, check-up: 2)
- 3 practical problems (70% required to pass)
3. Data Structures, Algorithms and STL
3.1. Numeral Systems (lectures: 1, exercises: 1)
- Numeral systems
- Computer representation of numbers
3.2. Algorithms and Complexity (lectures: 2, exercises: 0)
- Algorithms complexity
- Asymptotic notation
- Analyzing and computing complexity
3.3. Data Structures (lectures: 3, exercises: 6)
- Self-Referential Classes
- Dynamic Memory Allocation and Data Structures
- Linked Lists
- Stacks
- Queues
- Trees
3.4. Bits, Characters, C-Strings and structs (lectures: 4, exercises: 6)
- Structure Definitions
- Initializing Structures
- Using Structures with Functions
- typedef
- Example: High-Performance Card Shuffling and Dealing Simulation
- Bitwise Operators
- Bit Fields
- Character-Handling Library
- Pointer-Based String-Conversion Functions
- Search Functions of the Pointer-Based String-Handling Library
- Memory Functions of the Pointer-Based String-Handling Library
3.5. Standard Template Library (STL): Containers and Iterators (lectures: 4, exercises: 6)
- Introduction to the Standard Template Library (STL)
- Introduction to Containers, Iterators and Algorithms
- Sequence Containers: vector, list, deque
- Associative Containers: multiset, set, multimap, map
- Container Adapters: stack, queue, priority_queue
- Class bitset
3.6. Standard Template Library (STL): Algorithms (lectures: 4, exercises: 4)
- fill, fill_n, generate and generate_n
- equal, mismatch and lexicographical_compare
- remove, remove_if, remove_copy and remove_copy_if
- replace, replace_if, replace_copy and replace_copy_if
- Mathematical Algorithms
- Basic Searching and Sorting Algorithms
- swap, iter_swap and swap_ranges
- copy_backward, merge, unique and reverse
- inplace_merge, unique_copy and reverse_copy
- Set Operations
- lower_bound, upper_bound and equal_range
- Heapsort
- min and max
3.7. More about Classes, Objects and Namespaces (lectures: 2, exercises: 3)
- const_cast Operator
- namespaces
- Operator Keywords
- mutable Class Members
- Pointers to Class Members (.* and ->*)
- Multiple Inheritance
- Multiple Inheritance and virtual Base Classes
Intermediate Exam #3 (problems: 4, check-up: 2)
- 3 practical problems (70% required to pass)
4. XML and Graphics Development
4.1. Working with XML (lectures: 4, exercises: 8 )
- Basic XML concepts (Well-formed XML, namespaces, DTD, XSD, XML parsers)
- Apache xerces library
- Using the DOM parser
- parsing, processing, modifying and creating XML documents
- Using XPath queries
4.2. OpenGL and Simple DirectMedia Layer (SDL) (lectures: 6, exercises: 12)
- SDL basic library
- SDL_image - support for image formats
- SDL_mixer - complex audio functions, mainly for sound mixing
- SDL_net - networking support
- SDL_ttf - TrueType Font rendering support
- SDL_rtf - simple Rich Text Format rendering
5. Software Engineering and Team Working
5.1. Software Engineering - Overview (lectures: 3, exercises: 0)
- Software engineering fundamentals
- Processes, methodologies and typical project development lifecycle
- Project plan
- Analysis and Specification
- Architecture and design
- Implementation
- Testing: unit testing, integration testing, stress testing
- Deployment
5.2. High-Quality Programming Code Construction (lectures: 4, exercises: 0)
- High-Quality Programming Code: Definition
- Designing High-Quality Software
- High-Quality Functions and Methods
- Defensive Programming
- Using Variables
- Naming Variables
- Code Refactoring
- Self-Documenting Code
5.3. Source Control Systems - CVS (lectures: 3, exercises: 2)
- Software configuration management and source control repositories
- Versioning models: Lock-Modify-Unlock and Copy-Modify-Merge
- Using CVS source control repository
5.4. Doxygen Documentation (lectures: 1, exercises: 2)
- Defining and using doxygen documentation
5.5. Build Tools - make (lectures: 2, exercises: 2)
- Build tools- creating and using "make" build scripts
- make build files
- make build process
5.6. Design Patterns (lectures: 6, exercises: 0)
- Design Patterns Introduction
- Creational Patterns: Factory Method, Abstract Factory, Singleton
- Structural Patterns: Adapter, Façade
- Behavioral Patterns: Command, Iterator, Observer, Strategy
- Architectural Patterns: Model-View-Controller (MVC), Client-Server, Three-Tier
Intermediate Exam #4 (problems: 4, check-up: 2)
- 3 practical problems (70% required to pass)
6. Practical Project (lectures: 0, exercises: 80)
The practical project will be an assignment to implement a simple game with C++ and SDL.
It will be based on these technologies (but not only):
- Object-oriented programming with C++
- STL and Boost
- SDL library (2D Graphics and networking)
The project covers the following elements of the software engineering:
- Analyzing the software requirements documentation and defining specification
- Creating system architecture and designing the modules of the system
- Implementing the modules of the system and integration
- Testing and debugging
- Using source control repository (CVS)
Each project is done by a team of 3-5 students.
Training Duration
Duration: ~ 320 hours
Time allocation: 4 months, 4hours / day
Discussion Forum
Visit the official discussion forum of the course if you have any technical questions regarding the lectures, exercises or homeworks.
