Information Technology Reference
In-Depth Information
An activity diagram focuses on the flow of activities involved in a single
process. Collaboration diagrams are another form of interaction diagram, which
focuses on object roles to describe a process. Component diagrams are physical
analogs of class diagrams, that is, they convey the actual distribution of a software
system across physical computer systems. Deployment diagrams show the con-
figuration of run-time processing nodes. An interface is a collection of operations
that define the way in which an external entity is to interact with a class or
package. A package is a collection of model elements. A note is simply a symbol
for relaying useful information about a UML model.
3.7 Exercises
1. Last chapter, we asked you to explain the difference between a class and an
object using examples. Now, present the same difference, this time using
models.
2. Think yet again about the truck class and its vehicle superclass that we
have used throughout this topic. Create a different subclass of vehicle with
at least two unique attributes and two unique methods. Finally, create an
instantiation (object) of this new class. Diagram your new class, depicting its
relationship with the vehicle superclass and the object you chose to create.
3. Consider the following sequence involved in starting the monster_truck
object:
Step 1: Insert key into ignition and turn. Sends message to …
Step 2: ignition_controller performs calculations and sends message
to …
Step 2.1: fuel_injector injects fuel [if there is fuel ] and sends message
to …
Step 2.2: spark_plug ignites [if there is power ] and sends message to…
Step 3: piston , at which point the monster truck is started and the igni-
tion reverts back to its initial state.
At each step in this sequence, an object performs an action, and then sends
some message to the next object in the sequence. In the second step, a fork is
initiated and two separate transitions appear next, which then join again in the third
step. Each parallel process initiated after step two checks for some condition
(contained in brackets ([])), which must be true for the sequence to continue on. If
these conditions are met, the piston reacts. If not, it remains static. In either
case, the sequence ends after this step, when the ignition reverts to its inactive
state. Illustrate this sequence using a sequence diagram.
Search WWH ::




Custom Search