unit Vehicles
 


unit Vehicles;

interface

type
Vehicle = object
Wheels : integer;
Weight : real;
constructor Init(In_Wheels : integer; In_Weight : real);
function Get_Wheels : integer;
function Get_Weight : real;
function Wheel_loading : real;
end;

implementation

constructor Vehicle.Init(In_Wheels : integer; In_Weight : real);
begin
Wheels := In_Wheels;
Weight := In_Weight;
end;

function Vehicle.Get_Wheels : integer;
begin
Get_Wheels := Wheels;
end;

function Vehicle.Get_Weight : real;
begin
Get_Weight := Weight;
end;

function Vehicle.Wheel_loading : real;
begin
Wheel_Loading := Weight/Wheels;
end;

end.



Result of execution

This file cannot be executed.)

(c) Shilpa Sayura Foundation 2006-2017