Introduction to OOP: Chapter 11: Replacement and Refinement [next] [previous] [audio] [real] [text]

Example Declaration in Object Pascal

type
	Employee = object
		name : alpha;
		wage : integer;
		function pay(HoursWorked : integer) : integer;
		function hourlyWorker : boolean;
		end;

	SalaryEmployee = object (Employee)
		salary : integer;
		function pay(HoursWorked : integer) : integer; override;
		function hourlyWorker : boolean; override;
		end;
Intro OOP, Chapter 11, Slide 12