Delphi-Quellcode:
type
TProt = class abstract
public
procedure Send(const Buf : Array of byte); virtual; abstract;
procedure Verarbeite; virtual; abstract;
end;
TProt1 = class(TProt)
privat
procedure MachWasAB;
procedure MachWasABC;
procedure MachWasABCD;
public
constructor create; virtual;
procedure Send(const Buf : Array of byte); override;
procedure Verarbeite; override;
end;
TProt2 = class(TProt1)
privat
procedure MachWasABCDE;
procedure MachWasABCDEF;
public
constructor create; override;
procedure Send(Const Buf : Array of Byte); override;
procedure Verarbeite; override;
end;
Dann würde TProt2 ja alles unnütze private von TProt1 erben ?