C++ Foundations is designed to teach the non-object-oriented portion of the C++ language. It is a hands-on class in which you will learn how to write C++ programs with multiple source files. Throughout the course, you will be encouraged to develop and practice good software design methodologies. Offered: AWSpSu.
Course Goals....
The course begins with simple C++ programs that use a single source file then progresses to the study of keyboard input and screen output. Subsequent topics include the concept of functions, programs comprising multiple functions, intrinsic data types, user-defined types, arrays, strings, memory management, pointers and pointer management, dynamic and static memory allocation, loops and relational expressions, branching statements; and logical operators. The course next introduces functions of reasonable complexity and programs made up of multiple source files that can be compiled and linked into a single program.
By the end of the class, the student should have a working knowledge of the non-object-oriented portion of C++, and will be able to design, write, and debug robust multiple file programs.
Course Syllabus....
Introduction
- A Little History of
- Computers
- The C and C++ Languages
- Abstraction and Concepts of Object-Oriented Programming
- Portability and Standards
- The Mechanics of Creating a Program
- Software Development Process
- Compiling. Assembling, and Linking
- Taking a Look a Look at C++
- C++ Source Code Formatting and Program Style
- C++ Preprocessor
- Header Filenames
- C++ Comments
- The main() Function and Program Structure
- The iostream and Simple Input and Output
- Testing Your Program
C++ Building Blocks
- Identifiers
- Simple Variables
- Intrinsic Types
- Integer Types
- Integer Constants and the const Qualifier
- The char Type: Characters and Small Integers
- The bool Type
- Floating-Point Numbers
- Floating-Point Types and Constants
- Unsigned Types
- The Size of Variables
- Functions
- Function Prototypes
- Function Arguments
- Using a Function with a Return Value
- Function Variations
- C++ Arithmetic Operators
- Operator Precedence and Associativity
- Type Conversions
- Conversion on Assignment, in Expressions, and in Passing Arguments
- Type Casts
Strings, Arrays, and Structures
- Arrays
- Initialization and Accessing
- Strings
- String Operations
- Using Strings in an Array
- String Input and Output
- Structures
- Structure Properties
- Initialization and Accessing
- Unions
- Enumerations
- Setting Enumerator Values
- Value Ranges for Enumerations
Pointers and Managing Memory
- Pointer Variables
- Variables and Data
- Variables and Addresses
- Declaring and Initializing Pointers
- Pointers and Input and Output
- Pointer Arithmetic
- Dynamic Memory
- Managing Memory
- Pointers and the Free Store
- Allocating Memory with new
- Freeing Memory with delete
- Pointers and C Style Strings
- Automatic Storage, Static Storage, and the Free Store
- Pointers and Arrays
- Single and Multidimensional Arrays
- Generic and NULL Pointers
- Function Pointers
- Indirect Reference Pointers to Pointers
- Reference Types
- Function Parameters
- References
- Structs
- Arrays
- Single and Multidimensional
Control and Control Flow
- Program Execution
- Sequential, Branch, Loop
- Loops
- Entry and Exit Condition Loops
- For, While, Do
- Infinite loops
- Break and Continue Directives
- Branch
- If and If Else Constructs
- Switch a Multiway Branch
- Expressions and Statements
- Compound Statements or Blocks
- Relational Expressions
- Logical Operators and Logical Expressions
- The Logical OR, AND, and NOT Operators
- Recursion
Storage Classes, Scope, and Linkage
- Separate Compilation
- Storage Classes, Scope, and Linkage
- Automatic Variables and the Stack
- The static Storage Class and Modifier (Local Variables)
- Linkage and External Variables