Microsoft Word OpenIssuesInOO. doc


  Types versus classes



Download 1.28 Mb.
Pdf ko'rish
bet28/51
Sana29.08.2021
Hajmi1.28 Mb.
1   ...   24   25   26   27   28   29   30   31   ...   51
4.7 

Types versus classes 

One of the open issues within the object-oriented community is the discussion of type 

versus class. Is it the same or should there be a distinction. Traditionally it has been 

considered a great advantage that class/subclass relations also define  type/subtype relations. 

However, as mentioned above, subclassing and redefinition has been used a lot to obtain 

code reuse, leading to subclasses without any conceptual relations to their superclasses. 

Consequently, it is now more common to distinguish between classes and types. In this 

section we shall try to summaries the discussion and some of the various point of views. 

The main arguments for distinguishing between type and class are: a type defines the 

interface of a set of objects and a class defines its implementation;  for a given type there 

may be many different implementations; a subclass of a given class does not necessarily 

define a subtype of the type implemented by the type of the class; and specification and 

interface should be kept separate. 


Download 1.28 Mb.

Do'stlaringiz bilan baham:
1   ...   24   25   26   27   28   29   30   31   ...   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