unit TConUnit;

interface
 type TConverter = class(TObject)
      private
        fInch : Real;
        fPounds : Real;
      public
        constructor create; overload;
        constructor create(inch, pounds : Real); overload;
        procedure setInchVal(inch : Real);
        procedure setPoundsVal(pounds : Real);
        function getInchVal:Real;
        function getPoundsVal:Real;

        function getMillimetreVal : Real;
        function getKgVal : Real;
 end;
implementation

{ TConverter }

constructor TConverter.create;
begin
  fInch := 0;
  fPounds := 0;
end;

constructor TConverter.create(inch, pounds : Real);
begin
  fInch := inch;
  fPounds := pounds;
end;

function TConverter.getInchVal: Real;
begin
   Result := fInch;
end;

function TConverter.getKgVal: Real;
begin
   Result := fPounds * 0.4535;
end;

function TConverter.getMillimetreVal: Real;
begin
  getMillimetreVal := fInch * 25.4;
end;

function TConverter.getPoundsVal: Real;
begin
   Result := fPounds;
end;

procedure TConverter.setInchVal(inch: Real);
begin
   fInch := inch;
end;

procedure TConverter.setPoundsVal(pounds: Real);
begin
  fPounds := pounds;
end;

end.
