23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.3 Classes 63<br />

A message interface defines the names <strong>of</strong> messages that can be accepted. Collaborating<br />

objects communicate by mutual sending <strong>of</strong> messages. Classes can be visualised, in so-<br />

Class<br />

symbol<br />

Class sort<br />

P: Motor<br />

Attributes:<br />

Speed<br />

Messages:<br />

Start<br />

Stop<br />

Class name<br />

Figure 4.2: Object Class Symbol<br />

Class<br />

attributes<br />

field<br />

Class<br />

messages<br />

field<br />

called Object Class Diagrams, by the notation in Figure 4.2. The upper field contains class<br />

sort and class name. Figure 4.2 shows a class Motor with class sort P. The class sort is<br />

either P or D. P denotes that it is a class <strong>of</strong> Process objects, and D denotes Data objects.<br />

The distinction between these sorts <strong>of</strong> objects is explained in Section 4.4. Attribute names<br />

and Message names are shown in the corresponding Attributes and Messages fields.<br />

4.3.2 Class and Type<br />

Besides the concept <strong>of</strong> class the concept <strong>of</strong> type can be used to find objects that have<br />

identical properties. Objects that are similar are said to be <strong>of</strong> the same type. Type and<br />

class are not the same concept. An object class contains objects that are <strong>of</strong> the same<br />

type. However, objects that are the same type may be put in separate classes. Figure<br />

4.3 visualises this. Five objects are <strong>of</strong> type X. All objects in class A are <strong>of</strong> the same type,<br />

which is type X. The same holds for class B. However, although the five objects are <strong>of</strong><br />

the same type, they are separated into different classes A and B. Recognising types is a<br />

premise for classification. However, an object’s type does not determine its class.<br />

Classes are constructed by grouping entities based on particular selected aspects and<br />

properties. Objects are abstractions <strong>of</strong> ’real’ entities from the problem domain. These<br />

entities may have many different properties and forms <strong>of</strong> behaviour. What counts,<br />

however, is what properties are selected to be modelled. Only properties that are<br />

relevant for the behaviour <strong>of</strong> the system will be incorporated into the model. All other<br />

properties disappear by abstraction. Discovering common properties <strong>of</strong> objects is called<br />

generalisation. A part <strong>of</strong> the properties <strong>of</strong> a collection <strong>of</strong> entities is general; another part<br />

is specific. Classification requires finding collections <strong>of</strong> entities with the same properties<br />

and capabilities.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!