*> Accessibility keywords public private internal protected protected internal static *> Inheritance class-id FootballGame inherits type Competition. ... end class.
*> Interface definition interface-id IAlarmClock. ... end interface. *> Inheriting an interface interface-id IAlarmClock inherits type IClock. ... end interface. *> Interface implementation class-id WristWatch implements type IAlarmClock, type ITimer. ... end class.
// Accessibility keywords public private protected static // Inheritance class FootballGame extends Competition { ... } // Interface definition interface IAlarmClock { ... } // Extending an interface interface IAlarmClock extends IClock { ... } // Interface implementation class WristWatch implements IAlarmClock, ITimer { ... }
Portions of these examples were produced by Dr. Frank McCown, Harding University Computer Science Dept, and are licensed under a Creative Commons License.