Ch5. Class Definition

5/31/00


Click here to start


Table of Contents

Ch5. Class Definition

Similarities & Minor Differences

Example

Separation of Class & Implementation

Example of inline

Interface & Implementation Files

Example of Interface

The inline Directive

Prototypes

Examples of Prototypes

External Declarations

Example of extern

Forward References

Forward Reference

Example of Forward References

Example of Forward References

Example of Forward References

Constructors and Initialization

Default & Copy Constructors

Example of Constructors

Initializers

Example of Initialization

Example of Initializers

Example of Initializers

Example of Initializers

Order of Initialization

Initialization in Java

Output of Java

Initialization in C++

Output of C++

Combining Constructors

Example of Constructors

Example of Constructors

The Orthodox Canonical Class Form

Visibility Modifiers

Example of Modifiers

Inner Classes vs. Nested Classes

PPT Slide

public void push_front(Object val) { if (firstElement == null) firstElement = new Link(val, null, null); else firstElement.addBefore (val); }... // other methods omitted

PPT Slide

PPT Slide

PPT Slide

static Initialization

Example of static

Example of final

final Classes

Example of final Classes

Email: budd@cs.orst.edu

Home Page: http://www.cs.orst.edu/~budd