Microsoft Word OpenIssuesInOO. doc



Download 1.28 Mb.
Pdf ko'rish
bet16/51
Sana29.08.2021
Hajmi1.28 Mb.
1   ...   12   13   14   15   16   17   18   19   ...   51

part pattern 

reference 

object reference 

pattern reference 

 

It is important to distinguish between 'object' and 'object reference'. In the next two sections 



we discuss these distinctions in further detail and give some examples. 

4.1.1.  Part object versus object reference 

A part object is an object that is physically a part of the enclosing object. In BETA, part 

objects may be described as follows: 

Car: 


 

(#  motor: @ (# ... #) 

 

 

body: @ (# ... #); 



 

 

wheels: [4] @ Wheel 



 #) 

A car object consists of  part objects corresponding to the motor, body and 4 wheels. The 

symbol '@' means part object in BETA. The properties of motor and body are described 

directly using singular objects (

(# ... #)

), whereas the 4 wheels are described as an array 

consisting of 4 instances of pattern Wheel. 

An object reference may also be part of an object, but in this case it is the reference that 

is a part. The reference refers to an object that is not necessarily part of the object.  The 

following pattern shows examples of object references in BETA: 

HotelReservation: 

 (# 


theCustomer: 

^Customer; 

   theHotel: 

^Hotel; 


   theRoom: 

^Room; 


 

 

theDate: @ date 



 #) 

A hotel reservation consists of components that are references (described by '^') to 

Customer-,  Hotel- and Room objects.  The  same customer, hotel, or room may be 

referred from many different hotel reservations. The corresponding attributes are therefore 

represented as references, not as a part objects. In the car example, a motor is a physical part 

of a specific car, whereas a customer is not considered part of a specific hotel reservation.  

I.e. a Car object has a physically embedded motor object, whereas a 

HotelReservation  object has a reference to a Customer object and each Customer 

object may be referred/shared by many HotelReservation objects. 


Download 1.28 Mb.

Do'stlaringiz bilan baham:
1   ...   12   13   14   15   16   17   18   19   ...   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