Microsoft Word OpenIssuesInOO. doc


  Types versus classes



Download 1,28 Mb.
Pdf ko'rish
bet28/51
Sana29.08.2021
Hajmi1,28 Mb.
#158917
1   ...   24   25   26   27   28   29   30   31   ...   51
Bog'liq
OpenIssuesInOO

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 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