Курсовая работа: Моделирование систем
procedure Pass(SourceIndex : integer); override;
end;
TSource = class(TShop)
private
procedure TakeParcel(SourceIndex: integer);override;
public
procedure Pass(SourceIndex : integer); override;
procedure AskForParcel; override;
end;
TAccumulator = class(TElement)
private
FParcels : TList;
FLimited : Boolean;
FCapacity : integer;
function GetParcel(Index : integer): TParcel;
function GetFreeSpacePresent : Boolean;
function GetEmpty: Boolean;
procedure SetCapacity(Value : integer);
function GetCapacity : integer;
function GetParcelCount : integer;
procedure Pass(SourceIndex : integer); override;
function GetCanTake : Boolean; override;
function GetCanDrop : Boolean; override;
public
constructor Create; override;
destructor Destroy; override;
procedure ClearContainer; override;
procedure DropParcel; override;
property ParcelCount : integer read GetParcelCount;