CPP Module II Lesson Plan
CPP Module II Lesson Plan
Module II
1
Lesson 1: Templates
Goals:
Key Topics:
• Class Templates
o Class Template Definition
o Class Template Implementation
o Class Template Instantiation
• A Table Template Class
o Table Data
o Class Interface
o destroy
o resize
o The Overloaded Parenthesis Operator
o The Table Class
• Function Templates
Projects:
Exams/Quizzes: NONE
2
Lesson 2: Exception Handling
Goals:
• Understand the method of catching errors via function return codes, and an
understanding of the shortcomings of this method.
• Become familiar with the concepts of exception handling, its syntax, and its benefits.
• Learn how to write assumption verification code using asserts.
Key Topics:
• Error Codes
• Exception Handling Basics
• Assert
Projects:
Exams/Quizzes: 10 Question (multiple choice) quiz. Covers topics from Chapter 10 & 11; 5%
of final grade.
3
Lesson 3: Number Systems
Goals:
• Learn how to represent numbers with the binary and hexadecimal numbering systems,
how to perform basic arithmetic in these numbering systems, and how to convert
between these numbering systems as well as the base ten numbering system.
• Gain an understanding of how the computer describes intrinsic C++ types internally.
• Become proficient with the various binary operations.
• Become familiar with the way in which floating-point numbers are represented
internally.
Key Topics:
• Number Systems
o The Binary Number System
Counting in Binary
Binary and Powers of 2
Binary Arithmetic
Converting Binary to Decimal
Converting Decimal to Binary
o The Hexadecimal Number System
Counting in Hexadecimal
Hexadecimal Arithmetic
Converting Hexadecimal to Binary
Converting Binary to Hexadecimal
• Bits and Memory
• Bit Operations
o AND
o Inclusive OR
o NOT
o Exclusive OR
o Shifting
o Compound Bit Operators
• Floating-Point Number Analysis
Projects:
4
Exercise 3.5: Binary to Decimal
Exercise 3.6: Decimal to Binary
Exercise 3.7: Bit Operation Calculator
Exams/Quizzes: NONE
5
Lesson 4: The Standard Template Library
Goals:
• Discover how lists, stacks, queues, deques, and maps work internally, and in which
situations they should be used.
• Become familiar with a handful of the generic algorithms the standard library provides
and how to apply these algorithms on a variety of data structures.
• Learn how to create objects that act like functions, called functors, and learn how to
create and use predicates with the standard library.
Key Topics:
• Linked Lists
• Stacks
• Queues
• Deques
• Maps
• Algorithms
• Functors
• Predicates
Projects:
Exams/Quizzes: 10 Question (multiple choice) quiz. Covers topics from Chapter 12 & 13;
5% of final grade.
6
Lesson 5: Win32 Programming I: Basic Windows Programming
Goals:
Key Topics:
Projects:
Exams/Quizzes: NONE
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 25% of student final grade.
8
Lesson 6: Win32 Programming II: GDI and Menus
Goals:
• Learn how to output text onto a window, and how to draw several GDI shape primitives
like lines, rectangles and ellipses
• Understand how different pens and brushes can be used to change the way GDI shapes
are colored and drawn
• Learn how to load bitmap (.bmp) images from file into our Windows programs, and how
to draw them on the client area of our windows
• Become familiar with the Visual C++ menu resource editor, and learn how to create
menus
Key Topics:
• Text Output
o The WM_PAINT Message
o The Device Context
o TextOut
o Example Program
• Shape Primitives
o Drawing Lines
o Drawing Rectangles
o Drawing Ellipses
• Bitmaps
o Loading
o Rendering
o Deleting
• Pens and Brushes
• Menus
o Creating a Menu Resource
o Loading a Menu and Attaching it to a Window
o Checking Menu Items
o Selecting Menu Items
Projects:
9
Exams/Quizzes: 10 Question (multiple choice) quiz. Covers topics from Chapter 14 & 15; 5%
of final grade.
10
Lesson 7: Win32 Programming III: Dialogs and Controls
Goals:
• Learn how to create modal and modeless dialog boxes, and how to distinguish between
the two.
• Discover how to create and design dialog boxes with the Visual C++ resource editor.
• Become familiar with several Win32 controls such as static text controls, picture box
controls, edit box controls, radio button controls, button controls, and combo box
controls.
Key Topics:
Projects:
Exams/Quizzes: NONE
11
Lesson 8: Sprite Animation
Goals:
• Learn how to use the Windows multimedia timer functions for smooth animation.
• Discover how to do basic 2D computer animation
• Understand the technique of double buffering to avoid flicker
• Learn how to draw complex non-rectangular 2D image bitmaps using the GDI raster
operations.
Key Topics:
• Timing
o Windows Multimedia Timer Functions
o Computing Elapsed Time
o Computing Frames Per Second
• Double Buffering
• Sprites
o Theory
o Implementation
o Art Resources
Projects:
Exams/Quizzes: NONE
12
Lesson 9: Final Game
Goals:
• Become familiar with the three-stage software development process of analysis, design,
and implementation.
• Practice the three-stage software development process by analyzing an Air Hockey
game, designing an Air Hockey game, and implementing an Air Hockey game.
Key Topics:
• Analysis
• Object Identification
• Game Behavior/Problem Solving
• Design
• Algorithms
o Mouse Velocity
o Paddle Artificial Intelligence
o Puck-Paddle Collision
o Puck-Wall Collision
o Paddle-Wall Collision
o Pausing/Un-pausing
o Keeping Score
• Software Design
• Implementation
• Main Application Code
Projects:
Exams/Quizzes: 10 Question (multiple choice) quiz. Covers topics from Chapter 16, 17 & 18;
5% of final grade.
13
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
14
Final Examination
The final examination in this course will consist of 50 multiple-choice and true/false questions
pulled from all of the 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 two hours to complete. It is worth 55% of student final grade.
15