Project:
|
![]() Figure PR.06 - Our Simple Example Router - Illustrative : Class diagram
Recapping, this is what we know:<br/> • A Router is-a type of Device<br/> • There are two types of EquipmentHolders, Slots and Chassis<br/> • A PowerSupply is-a type of AuxiliaryComponent<br/> • A LineCard is-a type of Card, which is-a type of Hardware (for a more concrete illustration, we are substituting different types of cards that are part of the “real” model that is being developed; a LineCard is a synonym for a NetworkCard, but the following Figure shows other types of Cards as well)<br/> • A NetworkCard fits into a Slot of a Chassis<br/> • A PowerSupply fits directly into the Chassis<br/>The physical part of the Router consists of all of the above Equipment and EquipmentHolders<br/><br/>Thus, what we conceptually have is the following model of our simple Router (note that not all subclasses are shown; rather, this is a simple example to define the concepts that we have developed to date).<br/><i>Router and Switch are for illustrative purposes only. Such classes are modelled using roles, but roles haven’t been introduced to the reader yet.</i><br/><i>Chassi and Slot inheritance relationships are for illustrative purposes only. The real inheritance will be shown later in this Addendum.</i><br/>The power of inheritance works well for us. Since PowerSupply and NetworkCard both ultimately inherit from Hardware, they also inherit the attributes and relationships that Hardware participates in. Thus, both a PowerSupply as well as a LineCard can be contained in an EquipmentHolder (not necessarily the same one) via the HoldsHardware aggregation. Similarly, both can be used to build a Router via the ConsistsOf aggregation.<br/>As for the two EquipmentHolders, we’ve chosen to make them siblings. That is, they are two separate objects that are derived from a common superclass (EquipmentHolder). This is an example of the object-oriented concept of specialization. Specialization is used to take a single concept and add detail to it. The added detail is in the form of subclasses that inherit all of the attributes and relationships (and, in the System view, methods and constraints as well) of their parent superclasses, but add their own characteristics and behavior (in the form of attributes and relationships, as well as methods and constraints in the System view).<br/>In this case, there is a fundamental difference between a Slot and a Chassis. However, since both of these classes are subclasses (i.e., types) of EquipmentHolder, we can simply reuse the HoldsHardware composition to enable a Chassis to contain Slots. Finally, the HoldsHardware aggregation can also be used to nest EquipmentHolders, as previously discussed.<br/>We’ve also added some additional detail, showing that there are (for now) three different types of Cards – MemoryCards, NetworkCards, and SystemCards. A MemoryCard is a type of Card that is dedicated to providing additional memory for use by other components of a Resource. Such Cards can be used to expand memory, or provide different types of memory.<br/>A NetworkCard is a type of Card that is dedicated to providing networking functions, such as routing and forwarding. Line cards and port adapter cards are examples of this type of card.<br/>Finally, a SystemCard is a type of Card that is dedicated to providing system functions. Main processor boards and controller boards are examples of this type of Card.<br/>Given this introduction, we will now introduce the concept of Roles. Roles are a fundamental means of providing an extensible model. An innovative feature is that it has physical as well as logical roles.<br/>
|