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