Introduction to OOP: Chapter 3: Classes and Methods: [next] [previous] [audio] [real] [text]

A Typical Method Implementation

implementation

const
	CardWidth = 65;
	CardHeight = 75;

function Card.color : colors;
begin
	case suit of
		Diamond:	color := Red;
		Heart:  	color := Red;
		Spade:  	color := Black;
		Club:   	color := Black;
	end
end;
Intro OOP, Chapter 3, Slide 18