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.

62 Abstraction <strong>of</strong> a Problem Domain<br />

constructed, and cannot be found by simple observation <strong>of</strong> a problem domain. They<br />

<strong>of</strong>ten come from technical solutions, mathematical models, and conceptual solutions.<br />

At least a part <strong>of</strong> the objects must be constructed. This defines a design activity during<br />

analysis. The design <strong>of</strong> an object requires the identification <strong>of</strong> adequate abstraction<br />

boundaries around collections <strong>of</strong> data and operations (services). Design must always<br />

deal with finding compromises between conflicting requirements. There must be dealt<br />

with conflicting requirements such as minimum interfaces, logical grouping, and adequate<br />

naming related to the problem domain. Properties <strong>of</strong> objects may be modelled as<br />

internal data (attributes), but they can also be modelled as separate objects.<br />

4.3 Classes<br />

4.3.1 Class Concept<br />

An object class is a collection <strong>of</strong> identical objects. Objects that belong to the same class<br />

have the same externally observable behaviour. Reuse is always mentioned as one <strong>of</strong><br />

the most important advantages <strong>of</strong> an object-oriented approach. Classification <strong>of</strong> objects<br />

is a means to achieve reuse. When objects are identical it is not necessary to describe the<br />

behaviour for each object individually. Once the behaviour has been defined, it can be<br />

reused by all similar objects. Therefore, behaviour <strong>of</strong> objects <strong>of</strong> a class is defined only once<br />

in an object class definition. This mechanism can consequently be used if we require that<br />

any object belongs to some class. Even when there is only one object with some specific<br />

type <strong>of</strong> behaviour its behaviour will be described in a class.<br />

An object class definition serves as a template for all objects <strong>of</strong> that class. The creation or<br />

derivation <strong>of</strong> an object from a class is called instantiation. An object is an instance from a<br />

class. Notice that class and class definition are different concepts. From now on we will<br />

use this terms without the sharp distinction.<br />

The objects <strong>of</strong> a class have the same properties. When we talk about properties we mean<br />

static properties as well as variable properties and capabilities (behaviour). The objects<br />

in a class represent identical things in the problem domain. Their meaning is the same.<br />

However, the individual objects <strong>of</strong> the same class can do different things. They may be<br />

in different states. They can perform different actions at some point in time.<br />

An object class definition defines the attributes <strong>of</strong> its objects. By the mechanism <strong>of</strong><br />

instantiation, all individual objects <strong>of</strong> a class have the same set <strong>of</strong> attributes. However,<br />

an attribute may have different values in different objects from that class. The set <strong>of</strong><br />

attributes in a class determines the set <strong>of</strong> properties <strong>of</strong> typical objects <strong>of</strong> that class. The<br />

attributes represent the data encapsulated in an object.<br />

Operations can access or transform attributes. Attributes are specified in the class<br />

definition. An operation in an object is activated after the reception <strong>of</strong> a message by<br />

that object. A class definition specifies the message interface <strong>of</strong> its objects (instances).

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

Saved successfully!

Ooh no, something went wrong!