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.
- Course scope, curriculum, exams, lectures, exercises
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 3 practical problems (70% required to pass)
- Object-Oriented Programming and Design Fundamentals
- Classes, Objects, Encapsulation, Inheritance, Polymorphism
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- The #include Preprocessor Directive
- The #define Preprocessor Directive: Symbolic Constants
- The #define Preprocessor Directive: Macros
-