Exam Two Review

This exam will cover the basics of Object oriented programming, and material covered since our last test.

Objects and Classes

  • Basic Class structure
    • Header file
      • Public definitions
      • Private definitions
    • Implementation file
      • Class methods
  • Using classes
    • Including the class header
    • Creating objects
  • Calling class methods (messages)

Designing classes

  • Think first, code later
    • Using graphics tools to help in the thinking
    • Separating concepts - objects from the user’s world
    • Keep responsibilities separate
    • focus on objects from the users world
    • What data are required for those objects?
    • What behavior do those objects need to provide?
  • Types of methods:
    • Constructors
    • Accessor methods
    • Mutator methods

Writing classes

  • Build a header file for the class
    • Standard template for header
  • Build implementation for the class
  • Add class files to project

Array topics

  • Initializing arrays
  • Passing arrays to functions

Searching and Sorting

  • Simple searching
  • Bubble Sorting


  • What is a pointer?
  • How do you create a pointer?
  • Pointer math (arrays).
  • Pointers that point to nothing.

Getting the address of a variable.

Linked Lists

  • Management class controls access to the list
  • Creating new objects with new
  • What is a destructor, and why is it needed>
  • What is a copy constructor and why is it needed?