Microsoft Word OpenIssuesInOO. doc


Block structure and multiple inheritance



Download 1.28 Mb.
Pdf ko'rish
bet23/51
Sana29.08.2021
Hajmi1.28 Mb.
1   ...   19   20   21   22   23   24   25   26   ...   51
Block structure and multiple inheritance 

Block structure can sometimes be used as an alternative to multiple inheritance. In 

Reference [Øst90] it is shown how a common use of multiple inheritance for modeling 

windows with titles and borders may be handled using block structure. Since a window may 

have a title, a border or both, the following multiple inheritance class hierarchy is often 

used: 



Window

WindowWithTitle                                WindowWithBorde

WindowWithTitleAndBorder

 

This window hierarchy may be described using nested patterns: 



Window: 

 

(#  Title: (# ... #); 



 

 

Border: (# ... #); 



   ... 

 #); 


aWindow: @ Window(# T: @Title; B: @Border #) 

The descriptions for title and border are made using nested patterns. For a given window

like  aWindow, a title object and a border object may be instantiated. For example if two 

titles are needed, two instances of Title are made.  




Download 1.28 Mb.

Do'stlaringiz bilan baham:
1   ...   19   20   21   22   23   24   25   26   ...   51




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

    Bosh sahifa
davlat universiteti
ta’lim vazirligi
maxsus ta’lim
O’zbekiston respublikasi
zbekiston respublikasi
axborot texnologiyalari
o’rta maxsus
nomidagi toshkent
guruh talabasi
davlat pedagogika
texnologiyalari universiteti
xorazmiy nomidagi
toshkent axborot
pedagogika instituti
rivojlantirish vazirligi
haqida tushuncha
toshkent davlat
Toshkent davlat
vazirligi toshkent
tashkil etish
matematika fakulteti
ta’limi vazirligi
kommunikatsiyalarini rivojlantirish
samarqand davlat
vazirligi muhammad
pedagogika universiteti
bilan ishlash
fanining predmeti
Darsning maqsadi
navoiy nomidagi
o’rta ta’lim
Ishdan maqsad
haqida umumiy
nomidagi samarqand
fizika matematika
sinflar uchun
fanlar fakulteti
maxsus ta'lim
Nizomiy nomidagi
ta'lim vazirligi
moliya instituti
universiteti fizika
Ўзбекистон республикаси
umumiy o’rta
Referat mavzu
respublikasi axborot
Toshkent axborot
таълим вазирлиги
Alisher navoiy
махсус таълим
Buxoro davlat