.


:




:

































 

 

 

 


ң ө, ә, қ.




:

1. ұғ.

2. ң ө

3. ң ә қ.

4. қ қ .

 

1. ұғ. ө ң құ ә қ , ә ң Create. Құң ң ә ө ү ң procedure өң Consructor ө ө. , ғғ ө:

TPerson = class // TPerson - ң

Prvate

Fname: nteger; //1 - өң

Faddress: strng[35]; //2 - өң

Constructor Create; // құ

Publc

Procedure Show; // Show - ә

End;

қ құ ә ?

әң , қ ә-ң ө :

AMyObject:= TMyObject.Create;

{ құғ қ }

...

AMyObject.Destroy;

 

ң ү. ң create. ң Destroy.

type

TMyObject = class(TObject)

MyFeld: nteger;

Constructor Create;

Destructor Destroy;

Functon MyMethod: nteger;

2. ң ө - ң ғ . ң ң ұ қғ ғ. ң ө ә қ ұ . Ә ө ң ң қ ү қ. ү қ қ.

Қ ү property ө қ. , қ қ ң ү, ө, қ қ . Қ қ қ . қ ң ә ү ң ә . Ә қ ү қ қ: ө ә қ/ ү ә:

type

TAnObject = class(TObject)

functon GetColor: TSomeType;

procedure SetColor(ANewValue:

TSomeType);

property AColor:

TSomeType read GetColor wrte

SetColor;

end;

3. ң ә қ. ң ә (ң қғ ө ә ) ң ұ қ. Ә қ ң ә әң ү ө. Ә қ - қ ұқ. ң ә қ ә ә ң қ , әң ң ә ң ү ө ұ: ң - ң , ү ә әң . ә ң қ.

ң ө ң ә қ қ ү ң ө . Delph ң ө қ ү ң қ қ қ. ң қ ң ә қ ө ә ө қ ү қ ә . Қң ә қң ә (Wrte), қң ә қ - қң ә қ (Read) ә . ң қ қң ң Propertes ө, ң ү ә қ қ

ү қ әң .

- ң қ ұ қғ ғ ң ө, ә ә қ қ қ құғ ү ғ. ң ө ң қ ө, ә ә қ . ғ ғ ң ү ө қ. , қ TEmpl ғғ қғ TPerson FDep (ө) ө қ қ қғ . Protected ә prvate ұқ (ө, ә ә қ) қ ә ң қ protected (қғғ) ә prvate (ғ) ұқ . ұ ұқ ң ү қ. Protected қ қғ ң ө . Қ қ ң қ қ . Ә Protected ө ң ә қ . Prvate қ қғ . ғ ә ң қ . Ә Prvate ө ң өң , ө қ ү қ ә қ Protected ө .





:


: 2017-02-24; !; : 2911 |


:

:

, .
==> ...

1670 - | 1492 -


© 2015-2024 lektsii.org - -

: 0.009 .