Microsoft Word OpenIssuesInOO. doc

  Classification and composition

Download 1.28 Mb.
Pdf ko'rish
Hajmi1.28 Mb.
1   ...   11   12   13   14   15   16   17   18   ...   51

Classification and composition 

Object-oriented languages are often identified with languages supporting inheritance and of 

course it is difficult to claim that a language supports object-orientation if it does not include 

a mechanism for supporting inheritance. In class-based languages inheritance is supported 

by the class/subclass mechanism whereas in prototype-based languages it is supported by 

delegation. As mentioned elsewhere in this paper, it is not universally agreed whether or not 

the main benefit of inheritance is support for classification or reuse of code. However as 

said, in the Scandinavian school classification is more important than reuse. 

A problem with the object-oriented community, is that there has been a tendency to 

overuse inheritance. Often inheritance is used to represent composition. However, from a 

modeling point of view, classification and composition are two distinct means for 

organising knowledge and a language intended for supporting modeling should have good 

support for both. 

An object may contain components in the form of objects that are physically part of the 

object – such components are called part objects. An object may also contain components 

that are references to other objects  

An object may also contain components that are patterns. This is often called block-

structure. Finally an object may contain components that are references to patterns. Such 

references are in general closures that denote patterns and their lexical scopes.  

The following table summaries the 4 forms of components. The rows indicate whether 

or not the component is a (physical) part or a reference. The columns indicate whether or 

not the kind of the component is an object or a pattern: 

component/kind object  pattern 


part object 

Download 1.28 Mb.

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

Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan © 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