Introduction to Object Oriented Programming, 3rd Ed
Chapter 4
Classes and Methods
Outline
- Roadmap
- Same Ideas, Different Terms
- Encapsulation and Instantiation
- Internal and External Views
- Behavior and State
- Class Definitions
- A Typical Example, Class Definition n C++
- Visibility Modifiers
- A C# Class Definition
- A Java Class Definition
- Static and Final
- Pascal Dialects
- A Class Definition in Apple Object Pascal
- A Class Definition in Delphi Pascal
- A Class Definition in Smalltalk
- Methods
- An Example, from C#
- Constructors
- Accessor (or getter) methods
- Why use an Accessor?
- Setters (or mutators)
- Constant Data Fields
- Order of Methods
- Separation of Definition and Implementation
- Consderations in Method Definitions
- Variations on Classes
- Methods without Classes in Oberon
- Interfaces in Java
- Properties
- Properties in C#
- Inner or Nested Classes
- Class Data Fields
- Chapter Summary
Other Material
Intro OOP, Chapter 4, Outline