Introduction to OOP Chapter 4: Classes and Methods: next previous audio real text

Separation of Definition and Implementation

In some languages (such as C++ or Object Pascal) the definition of a method can be separated from its implementation. They may even be in a different file:

class PlayingCard {
public:
	...
	Colors  color     () ;
	...
};

PlayingCard::Colors PlayingCard::color ( ) 
{		
		// return the face color of a playing card
	if ((suit == Diamond) || (suit == Heart))
		return Red;
	return Black;
}

Notice need for fully-qualified names.
Intro OOP, Chapter 4, Slide 24