Introduction to Object Oriented Programming, 3rd Ed

Timothy A. Budd

Chapter 4

Classes and Methods

Outline

  1. Roadmap
  2. Same Ideas, Different Terms
  3. Encapsulation and Instantiation
  4. Internal and External Views
  5. Behavior and State
  6. Class Definitions
    1. A Typical Example, Class Definition n C++
    2. Visibility Modifiers
    3. A C# Class Definition
    4. A Java Class Definition
      1. Static and Final
    5. Pascal Dialects
      1. A Class Definition in Apple Object Pascal
      2. A Class Definition in Delphi Pascal
    6. A Class Definition in Smalltalk
  7. Methods
    1. An Example, from C#
    2. Constructors
    3. Accessor (or getter) methods
      1. Why use an Accessor?
      2. Setters (or mutators)
      3. Constant Data Fields
    4. Order of Methods
    5. Separation of Definition and Implementation
      1. Consderations in Method Definitions
  8. Variations on Classes
    1. Methods without Classes in Oberon
    2. Interfaces in Java
    3. Properties
      1. Properties in C#
    4. Inner or Nested Classes
    5. Class Data Fields
  9. Chapter Summary

Other Material

Intro OOP, Chapter 4, Outline