Académique Documents
Professionnel Documents
Culture Documents
Module I
1
Lesson 1: Introducing C++
Goals:
Key Topics:
• Variables
o Declarations and Definitions
o Names
o sizeof
o The unsigned Keyword
o Literal Assignments
o Type Conversions / Casts
o typedefs
o Const Variables
o Macros
• Arithmetic Operations
o Unary Arithmetic Operations
o The Modulus Operator
o Compound Arithmetic Operations
o Operator Precedence
2
Projects:
3
Lesson 2: Conditionals, Loops, and Arrays
Goals:
Key Topics:
Projects:
4
Exams/Quizzes: 10 Question (multiple choice) quiz. Covers topics from Chapter 2; 2% of
final grade.
5
Lesson 3: Functions
Goals:
Key Topics:
• User-Defined Functions
o Functions with One Parameter
o Functions with Several Parameters
• Variable Scope
• Math Library Functions
• Random Number Library Functions
• Function Overloading
• Default Parameters
Projects:
6
Lesson 4: References and Pointers
Goals:
Key Topics:
• References
o Constant References
• Pointers
o Computer Memory Primer
o Pointer Initialization
o Dereferencing
• Arrays Revisited
o Arrays and Pointers
o Pointer Arithmetic
o Arrays as Function Parameters
• Multiple Function Return Values using References and Pointers
• Dynamic Memory
o Allocating Memory
o Deleting Memory
o Memory Leaks
• std::vector
• Pointers to Functions
Projects:
7
Mid-Term Examination
The midterm examination in this course will consist of 25 multiple-choice and true/false
questions pulled from the first four textbook chapters. Students are encouraged to use the
lecture presentation slides as a means for reviewing the key material prior to the examination.
The exam should take no more than 60 minutes to complete. It is worth 27% of student final
grade.
8
Lesson 5: Object Oriented Programming
Goals:
Key Topics:
Projects:
9
Lesson 6: Strings and Miscellaneous C++ Topics
Goals:
Key Topics:
• Char Strings
• String Literals
• Escape Characters
• C-String Functions
o Length (strlen)
o Equality (strcmp)
o Copying (strcpy)
o Addition (strcat)
o Formatting (sprintf)
• std::string
o Length
o Relational Operators
o Addition
o Empty Strings
o Substrings
Inserting
Finding
Replacing
o Bracket Operator
o getline
• The this Pointer
• Friends
o Friend Functions
o Friend Classes
• The static Keyword
o Static Variables in Functions
o Static Data Members
10
o Static Methods
• Namespaces
o Variations of the “using” Clause
• Enumerated Types
Projects:
11
Lesson 7: Operator Overloading
Goals:
Key Topics:
• A Vector Class
o Constructors
o Equality
o Addition and Subtraction
o Scalar Multiplication
o Length
o Normalization
o The Dot Product
o Printing
o Accepting Input
• Overloading Arithmetic Operators
o Operator Overloading Syntax
o Overloading the Other Arithmetic Operators
• Overloading Relational Operators
• Overloading Conversion Operators
• Overloading the Extraction and Insertion Operators
• A String Class
o Assignment Operator
o Copy Constructor
o Bracket Operator
o Construction and Destruction
Projects:
12
Lesson 8: File Input/Output
Goals:
Key Topics:
• Streams
• Text File I/O
o Saving Data
o Loading Data
• Binary File I/O
o Saving Data
o Loading Data
Projects:
13
Lesson 9: Inheritance and Polymorphism
Goals:
• Understand what inheritance means in C++ and why it is a useful code construct.
• Understand the syntax of polymorphism, how it works, and why it is useful.
• Learn how to create general abstract types and interfaces.
Key Topics:
• Inheritance
o Repeated Inheritance
o “isa” vs. “hasa” relationships
o Base Class/Derived Class Casting
o Public vs. Private Inheritance
o Method Overriding
• Constructors and Destructors with Inheritance
• Multiple Inheritance
• Polymorphism
• How Virtual Functions Work
• The Cost of Virtual Functions
• Abstract Classes
o Interfaces
Projects:
14
Lesson 10: Exam Preparation and Course Review
Textbook: NONE
Goals:
In this final lesson we will leave the student free to prepare for and take their final
examination. Multiple office hours will be held for student questions and answers.
Key Topics:
Projects: NONE
Exams/Quizzes: NONE
Final Examination
The final examination in this course will consist of 75 multiple-choice and true/false questions
pulled from all of the textbook chapters covered to date. Students are encouraged to use the
lecture presentation slides as a means for reviewing the key material prior to the examination.
The exam should take no more than 120 minutes to complete. It is worth 55% of student final
grade.
15