Microsoft Word OpenIssuesInOO. doc



Download 1,28 Mb.
Pdf ko'rish
bet14/51
Sana29.08.2021
Hajmi1,28 Mb.
#158917
1   ...   10   11   12   13   14   15   16   17   ...   51
Bog'liq
OpenIssuesInOO

4. Abstraction 

mechanisms 


In the following examples, BETA is used as a reference language. One of the unique 

characteristics of BETA is that abstraction mechanisms such as class, procedure, function, 

control abstractions, process type, exception type, etc, have been unified into one single 

abstraction mechanisms called pattern. By abstraction mechanism we mean any language 

construct that describe the structure of a set of entities and may be used to instantiate such 

entities. A class describe the structure of objects and may be used to instantiate objects; a 

procedure describe the structure of procedure activations and may be used to instantiate 

procedure activations, etc.  The following is a simple example of BETA patterns: 

Account: 

   (# balance: @integer; 

      deposit: 

         (# amount: @integer 

         enter amount 

         do balance + amount -> balance 

         exit balance 

         #); 

       withdraw: (# ... #) 

   #) 


The pattern Account describes objects that have 3 attributes: balance,  deposit and 

withdraw.  Balance is a simple integer variable. Deposit and Withdraw are 

patterns. In this example Account corresponds to a class and is called a class pattern

whereas  deposit and withdraw corresponds to procedures and are called procedure 



patterns. The enter-part (enter amount) describes the input parameter, and the exit-part 

(exit balance) describes the output parameter of deposit. If myAccount refers to 

an instance of Account, then the following imperative makes a deposit of 500 and returns 

the new balance in currentBalance 

500 -> myAccount.deposit -> currentBalance 


Download 1,28 Mb.

Do'stlaringiz bilan baham:
1   ...   10   11   12   13   14   15   16   17   ...   51




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish