unit BMW; interface uses sportunit; type TSportCarBMW = class (TSportCar) private fEngineCount:byte; //число двигателей fCost: integer; protected constructor Create(Speed,PassCount,EngineCount:byte;Color,Mark:string); public procedure TakeCost; end; implementation constructor TSportCarBMW.Create(Speed,PassCount,EngineCount:byte;Color,Mark:string); begin inherited Create(Speed,PassCount,Color,Mark); fEngineCount:=EngineCount; end; procedure TSportCarBMW.TakeCost; begin randomize; fcost:=random(500000000); writeln('COST_($$$):', fcost); end; end.