Enter your Sign-on user name and password.

Forgot password?
  • Follow us on:
Loading video...

Start Learning Now

Our free lessons will get you started (Flash® 10 required).
Get immediate access to our entire library.

Sign up for Educator.com

Features Overview

  • Get on-demand access to our complete library
  • Search and jump to exactly what you need to learn
  • Track your progress
  • Download practice and lesson files
  • *Ask questions and get answers from our community & instructors

Source Files & OO Samples

  • Separate the application into “compilation units”
  • Each compilation unit is compiled into an “object” file which can be linked into an application
  • Compilation units include a header file to define the unit interface
  • Compilation units include a source file to define unit implementation
  • Best practice is to include one class, and name the files after it
  • This separation allows the implementation to be kept “secret” to avoid misuse by callers
  • The source file can be changed without recompiling entire application
  • A header might be included in multiple places, which can cause duplicate definitions.
  • We learn how to write headers that protect from problems caused by being included multiple times.
  • We show the C++ syntax for class definitions
  • We show the C++ syntax for class prototypes, saved in the header files, and class implementation, saved in the source files
  • Virtual base methods can be used to require derived classes to implement certain methods
  • Virtual base methods also allow for inherited Polymorphism, a powerful programming tool
  • Here is a link for more information about using classes and polymorphism in C++: http://www.cplusplus.com/doc/tutorial/polymorphism/

Source Files & OO Samples

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

Computer Science: Introduction to C++