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

Delphi Pascal


type
    Suits = (Heart, Club, Diamond, Spade);

    TPlayingCard = class (TObject)
        public
            constructor Create (r : integer; s : Suits);

            function suit : Suits;
            function rank : int;

        private
            suitValue : Suits;
            rankValue : integer;
    end;

Slightly different syntax, must name parent class, has visibility modifiers and constructors (more on those later).
Intro OOP, Chapter 4, Slide 14