Академический Документы
Профессиональный Документы
Культура Документы
Module I
1. Which are the 3 models used in OMT?Give the significance of each of them in
describing a system?
OMT Methodology(Object Modeling Technique)
The OMT consists of three related but different viewpoints each capturing
important aspects of the system i.e. the static, dynamic and functional behaviours
of the system.
These are described by object model, dynamic model and functional model of the
OMT.
1.Object model
For Eg shows a set of objects drawn from the implementation of an autonomous robot. This figure
focuses on some of the objects involved in the mechanism used by the robot to calculate a model
of the world in which it moves. There are many more objects involved in a running system, but
this diagram focuses on only those abstractions that are directly involved in creating this world
view.
Purpose of modeling
o To capture and precisely state requirements and domain knowledge so that all
stakeholders may understand and agree on them..
o To think about the design of a system.
o To capture design decisions in a mutable form separate from the requirements.
o To generate usable work products
o To organize, find, filter, retrieve, examine, and edit information about large
systems.
o To explore multiple solutions economically.
o To master complex systems
2)Visibility
Unless otherwise noted, the visibility of a role is public. Private visibility
indicates that objects at that end are not accessible to any objects outside the
association; protected visibility indicates that objects at that end are
not accessible to any objects outside the association, except for children of
the other end.
3) Qualification
4) Composition
Composition is a form of aggregation, with strong ownership and coincident lifetime as
part of the whole
.
5)Association class
An association class can be seen as an association that alsohas class properties, or as a
class that also has association properties
Example
In this diagram, four objects – User, ATM, Consortium and Bank - are
involved,which are shown with four vertical lines.
Fig
State Diagram
State diagrams are used to describe the behavior of a system. State diagrams
describe all of the possible states of an object as events occur.
Each diagram usually represents objects of a single class and tracks the different
states of its objects through the system
v) Control Flows
A control flow is a Boolean value that affects whether a process is evaluated.
Specifying Operations
Each operation can be specified in various ways. These are :
- Mathematical functions, such as trigonometric functions
- Table of input and output values for small finite sets
- Equations specifying output in terms of input
- Pre- and post- conditions
- Decision tables
- Pseudocode
Give any example for level 0 and level 1DFD
Examples of DFDs
Example1: An example of a Data Flow Diagram - DFD for a system that pays
workers is shown in the figure below. In this DFD there is one basic input data flow,the
weekly time sheet, which originates from the source worker. The basic output is the pay
check, the sink for which is also the worker. In this system, first the employee's record is
retrieved, using the employee ID, which is contained in the time sheet. From the
employee record, the rate of payment and overtime are obtained.
Figure: DFD of a system that pays workers.
Example-give any eg
12. Discuss
the
object
oriented
concepts and its application.
Inheritance
Inheritance allows a software developer to derive a new class from an existing one
The existing class is called the parent class, or super class, or base class
The derived class is called the child class or subclass
As the name implies, the child inherits characteristics of the parent
Inheritance has a lot of benefits
a. Extensibility
b. Reusability
c. Provides abstraction
d. Eliminates redundant code
Abstraction
Abstraction means ignoring irrelevant features, properties, or functions and
emphasizing the relevant ones
In JAVA abstraction is achieved in several ways:Abstract classes and Interfaces
Abstraction = managing complexity
Encapsulation
Encapsulation is a practice to bind related functionality (Methods) & Data
(Variables) in a protective wrapper (Class) with required access modifiers (public,
private, default & protected) so that the code can be saved from unauthorized
access by outer world and can be made easy to maintain.
Polymorphism
Polymorphism = ability to take more than one form (objects have more than one
type) than one type
Overloading allows multiple functions to exist with same name but different
parameters.
14. Describe dynamic modeling? Draw the state diagram for ATM network?
Refer qstn no 8
Generalization
A generalization is a relationship between a general thing (called the superclass or
parent)and a more specific kind of that thing (called the subclass or child). Generalization is
sometimes called an "is-a-kind-of" relationship: one thing (like the class BayWindow) is-a-kind-of
a more general thing (for example, the class Window).
Give any simple example
Association
An association is a structural relationship that specifies that objects of one thing are
connected to objects of another. Given an association connecting two classes, you can
navigate from an object of one class to an object of the other class, and vice versa
Realization
A realizationis a semantic relationship between classifiers in which one classifier
specifies a contract that another classifier guarantees to carry out. Graphically, a realization
is rendered as a dashed directed line with a large open arrowhead pointing to the
classifier that specifies the contracT
Essay questions
1. List and explain the eight steps involved in system design? (15)
The Purpose of System Design
System design is the high-level strategy for solving the problem and building a
solution
Bridging the gap between desired and existing system in a manageable way
Use Divide and Conquer
2. Identify concurrency
Dynamic Modeling is the guide to concurrency - Two objects are said to be
inherently concurrent if they can receive events at the same time without
interacting.
If the events are unsynchronized, the objects cannot be folded into a single
thread of control. (engine and wing control on an airplane must operate
concurrently).
By examining the state diagram of individual objects and the exchange of
events between them, many objects can be folded into a single thread of
control. A thread of control is a path through a set of state diagrams on which
only a single object at a time is active - thread remains in a state diagram until
an object sends an event to another object and waits for another event.
3. Alllocating subsystem to processors and tasks
Tasks are assigned to processors because:
Certain tasks are required at specific physical locations
Response time or information flow rate exceeds the available communication
bandwidth between a task and a piece of hardware.
Computation rates are too great for single processor, so tasks must be spread
among several processors
4. Managemant of data stores
The internal and external data stores in a system provide clean separation
points between subsystems with well defined interfaces. Data stores may
combine data structures, files, and database implemented in memory or on
secondary storage devices. The different data stores provide trade-offs
between cost, access time, capacity and reliability.
Files are cheap, simple and permanent form of data store. File operations are
low level and applications must include additional code to provide a suitable
level of abstraction. File implementations vary from machine to machine so
portability is more difficult.
5. Handling global resources
The system designer must identify the global resources and determine
mechanisms for controlling access to them - processors, tape drives, etc
If the resource is a physical object, it can control itself by establishing a
protocol for obtaining access within a concurrent system. If the resource is
logical entity (object ID for example) there is a danger of conflicting access.
Independent tasks could simultaneously use the same object ID. Each global
resource must be owned by a guardian object that controls access to it.
6. Choosing software control implementation
There are two kinds of control flows in a software system: external control
and internal control. Internal control is the flow of control within a process. It
exists only in the implementation and therefore is not inherently concurrent or
sequential. External control is the flow of externally visible events among the
objects in the system.
There are three kinds of external control:
Procedure driven systems: control resides within program code; it is easy to
implement but requires that concurrency inherent in objects be mapped into a
sequential flow of control.
Event driven systems - control resides within a dispatcher or monitor provided
by the language, subsystem or operating system. Application procedures are
attached to events and are called by the dispatcher when the corresponding
events occur.
Concurrent systems: control resides concurrently in several independent
objects, each a separate task.
7. Handling boundary conditions
We must be able to handle boundary conditions such as initialization,
termination and failure.
1. Initialization: The system must be brought from a quiescent initial state to a
sustainable steady state condition. Things to be initialized include constant
data, parameters, global variables, tasks, guardian objects and possibly the
class hierarchy itself.
2. Termination: It is usually simpler than initialization because many internal
objects can simply be abandoned. The task must release any external
resources that it had reserved. In a concurrent system, one task must notify
other tasks of its termination.
3. Failure: It is the unplanned termination of a system. Failure can arise from
user errors, from the exhaustion of system resources, or from an external
breakdown.
8 Setting trade off priorities
Cost, maintainability, portability, understandability, speed, may be traded off
during various parts of system design.
Hardware/Software Tradeoffs
Hardware can be viewed as a rigid but highly optimized form of software. The
system designer must decide which subsystems will be implemented in hardware
and which in software.
State Diagram
State diagrams are used to describe the behavior of a system. State diagrams
describe all of the possible states of an object as events occur.
Each diagram usually represents objects of a single class and tracks the different
states of its
objects through the system.
Steps to construct dynamic model
1)Prepare scenarios of typical interactions
2)Identify events between objects
3)Prepare an event trace for each scenario
4)Build a state diagram
5)Match events between objects to verify consistency
Fig
FUNCTIONAL MODEL
• The functional model describes the transformational and functional aspects of a
system.
• Contains DFD(Data Flow Diagram)
(b)Draw and explain a functional model of a flight simulator? (7)
4.(a) Describe the terms events, state, state diagrams and conditions
in the context of dynamic modeling? (8)
State
A state is a condition during the life of an object during which it satisfies some
condition, performs some activity, or waits for some external event.
A state corresponds to the interval between two events received by an object
and describes
the "value" of the object for that time period.
A state is an abstraction of an object's attribute values and links, where sets of
values are grouped together into a state according to properties that affect the
general behavior of the object. For instance, stack is empty or stack is full are
different states of the object stack. As state corresponds to interval between
two events received by an object so it has duration.
Event
An event is the specification of a significant occurrence. For a state machine, an
event is the occurrence of a stimulus that can trigger a state transition.
In other words, we can say an event is something that happens at a point in
time.
An event does not have duration. An individual stimulus from one object to
another is an
event. Press a button on mouse, airplane departs from an airport are examples
of events.
Conditions
Condition is a Boolean function of object values.
Eg temperature is below freezing
Being in a state is a condition
Conditions can be used as guards on transitions
A guarded transition fires when its event occurs ,but only if the condition is true.
Conditions can be used as guards on transitions “A guarded transition fires when
its events occur but only if the condition is true.
State Diagram
State diagrams are used to describe the behavior of a system.
State diagrams describe all of the possible states of an object as events occur.
Each diagram usually represents objects of a single class and tracks the different
states of its objects through the system.
It relates events and states. A change of state caused by an event is called a
transition. Transition is drawn as an arrow from the receiving state to the target
state.
A state diagram is graph whose nodes are states and whose directed arcs are
transitions labeled by event names.
State diagram specifies the state sequence caused by an event sequence.
How to draw state diagrams
State diagrams have very few elements. The basic elements are rounded boxes
representing the state of the object and arrows indicting the transition to the
next state.
The activity section of the state symbol depicts what activities the object will be
doing while it is in that state as shown Figure below.
Initial and Final States: All state diagrams being with an initial state of the object
as
shown in Figure .
This is the state of the object when it is created. After the initial state the object
begins changing states. Conditions based on the activities can determine what
the next state the object transitions to.
Module 2
Example-give any eg
COMPOSITION
. Composition
is a form of
aggregation, with strong ownership and coincident lifetime as part of the whole.
Parts with non-fixed multiplicity may be created after the composite itself, but
once created they live and die with it. Such parts can also be explicitly removed
before the death of the composite.
This means that, in a composite aggregation, an object may be a part of only one
composite at a time.
For example, in a windowing system, a Frame belongs to exactly one Window. This is
in contrast to simple aggregation, in which a part may be shared by several wholes.
For example, in the model of a house, a Wall may be a part of one or more Room
objects.
In addition, in a composite aggregation, the whole is responsible for the disposition
of its parts,which means that the composite must manage the creation and
destruction of its parts. For example, when you create a Frame in a windowing
system, you must attach it to an enclosing Window. Similarly, when you destroy the
Window, the Window object must in turn destroy its Frame parts.
2. What is an object diagram?Which are the notations used in object
diagram?
Object diagrams model the instances of things contained in class diagrams. An
object diagram shows a set of objects and their relationships at a point in time.
You use object diagrams to model the static design view or static process view of a
system. This involves modeling a snapshot of the system at a moment in time and
rendering a set of objects, their state, and their relationships.
Object diagrams commonly contain
· Objects
· Links
Like all other diagrams, object diagrams may contain notes and constraints .
Generalization
• Generalization is the relationship between a class and one or more
refined versions of it.
• The class being refined is called the “superclass” and each refined
version are called a “subclass”
• Attributes and operations that are common to a group of subclasses
are attached to the superclass and shared by each subclass
AGGREGATION VS GENERALIZATION
In aggregation distinct objects are involved;one of them is a part of
other
Generalization relates classes and is a way of structuring description
of a single object
Aggregation-part of relationship or(and relationship)
Generalization-is a relationship(or relationship)
Tagged values
Extends the properties of a UML stereotype
To create new information in the stereotype's specification.
Constraints
Extends the semantics of a UML building block
To add new rules or modify existing ones
Ternary association
Ternary association -is an association among three classes. On the same line,n-
ary association is an association among n classes.
The OMT symbol for ternary and n-ary associations is a diamond with lines
connecting to related classes.
Types of multiplicity
One to one association and links
many-to-many
one-to-optional .
DEPENDENCY
A dependency is a using relationship that states that a change in specification of one
thing (for example, class Event) may affect another thing that uses it (for example, class
Window), but not necessarily the reverse. Graphically, a dependency is rendered as a
dashed directed line, directed to the thing being depended on.
Generalization
A generalization is a relationship between a general thing (called the superclass or
parent)and a more specific kind of that thing (called the subclass or child).
Generalization is sometimes called an "is-a-kind-of" relationship: one thing (like the class
BayWindow) is-a-kind-of a more general thing (for example, the class Window).
Realization
A realizationis a semantic relationship between classifiers in which one classifier
specifies a contract that another classifier guarantees to carry out. Graphically, a realization
is rendered as a dashed directed line with a large open arrowhead pointing to the
classifier that specifies the contracT
In many modeling situations,it's important for you to state how many objects may be
connected across an instance of an association. This "how many" is called the
multiplicity of an association's role, and is written as an expression that evaluates to a
range of values or an explicit value.When you state a multiplicity at one end of an
association, you are specifying that, for each object of the
class at the opposite end, there must be that many objects at the near end. You can
show a multiplicity of exactly one (1), zero or one (0..1), many (0..*), or one or more
(1..*).
Roles
1. A role is one end of an association.
2. A binary association can have two roles, each of which may have a role name.
3. A role name is a name that uniquely identifies one end of an association.
4. Roles provide a way of viewing a binary association as a traversal from one
object to a set of associated objects.
ORDERING
Usually the objects on the "many" side of an association have no explicit
order, and can be regarded as a set.
Some times the objects on the many side of an association have order.
Writing {ordered} next to the multiplicity dot indicates an ordered set of
objects of an association.
Essay Questions
OBJECT DIAGRAMS
Object diagrams model the instances of things contained in class diagrams. An object
diagram
shows a set of objects and their relationships at a point in time.
You use object diagrams to model the static design view or static process view of a system.
This
involves modeling a snapshot of the system at a moment in time and rendering a set of
objects,
their state, and their relationships.Object diagrams are not only important for visualizing,
specifying, and documenting structural models, but also for constructing the static aspects
of systems through forward and reverse engineering.
Like all other diagrams, object diagrams may contain notes and constraints
Common Uses
You use object diagrams to model the static design view or static process view of a system
just
as you do with class diagrams, but from the perspective of real or prototypical instances
To model object structures
Identify the mechanism you'd like to model. A mechanism represents some function or
behavior of the part of the system you are modeling that results from the interaction of a
society of classes, interfaces, and other things.
For each mechanism, identify the classes, interfaces, and other elements that participate
in this collaboration; identify the relationships among these things, as well.
Consider one scenario that walks through this mechanism. Freeze that scenario at a
moment in time, and render each object that participates in the mechanism.
Expose the state and attribute values of each such object, as necessary, to understand
the scenario.
Similarly, expose the links among these objects, representing instances of associations
among them.
For Eg shows a set of objects drawn from the implementation of an autonomous robot. This
figure focuses on some of the objects involved in the mechanism used by the robot to
calculate a model of the world in which it moves. There are many more objects involved in a
running system, but this diagram focuses on only those abstractions that are directly involved
in creating this world view.
The terms "instance" and "object" are largely synonymous and so, for the most part, may be used
interchangeably. An instance is a concrete manifestation of an abstraction to which a set of
operations may be applied and which may have a state that stores the effects of the operation.
You use instances to model concrete or prototypical things that live in the real world. Almost
every building block in the UML participates in this class/ object dichotomy. For example, you can
have use cases and use case instances, nodes and node instances, associations and association
instances, and so on.
In the UML, the package is a general purpose mechanism for organizing modeling elements into
groups.
You use packages to arrange your modeling elements into larger chunks that you can manipulate
as a group. You can control the visibility of these elements so that some things are visible outside
the package while others are hidden. You can also use packages to present different views of
your system's architecture. Well-structured packages are therefore loosely coupled and very
cohesive, with tightly controlled access to the package's contents.
OWNED ELEMENTS
A package may own other elements, including classes, interfaces, components,
nodes,collaborations, use cases, diagrams, and even other packages. Owning is a composite
relationship, which means that the element is declared in the package. If the package is
destroyed, the element is destroyed. Every element is uniquely owned by exactly one package.
Visibility
You can control the visibility of the elements owned by a package just as you can control the
visibility of the attributes and operations owned by a class. Typically, an element owned by a
package is public, which means that it is visible to the contents of any package that imports the
element's enclosing package. Conversely, protected elements can only be seen by children, and
private elements cannot be seen outside the package in which they are declared. In Figure
OrderForm is a public part of the package Client, and Order is a private part. A package
that imports Client can see OrderForm, but it cannot see Order. As viewed from the
outside, the fully qualified name of OrderForm would be Client::OrderForm.
Importing and Exporting
The public parts of a package are called its exports. For example, in Figure, the package GUI
exports two classes, Window and Form. EventHandler is not exported by
GUI;EventHandler is a protected part of the package.
The parts that one package exports are visible only to the contents of those packages that
explicitly import the package. In this example, Policies explicitly imports the package GUI.
GUI::Window and GUI::Form are therefore made visible to the contents of the package
Policies.
iii)Classifiers
A classifier is a mechanism that describes structural and behavioral features. Classifiers include
classes, interfaces, datatypes, signals, components, nodes, use cases, and subsystems.
The most important kind of classifier in the UML is the class. A class is a description of a set of
objects that share the same attributes, operations, relationships, and semantics. Classes are not
the only kind of classifier, however. The UML provides a number of other kinds of classifiers .
Most of the time, you'll use realization to specify the relationship between an
interface and the class or component that provides an operation or service for it.
An interface is a collection of operations that are used to specify a service of a
class or a component. Therefore, an interface specifies a contract that a class or
component must carry out. An interface may be realized by many such classes or
components, and a class or component may realize many interfaces.
Realization of an Interface
Realization of a Use Case
In the UML, the package is a general purpose mechanism for organizing modeling elements into
groups.
You use packages to arrange your modeling elements into larger chunks that you can manipulate
as a group. You can control the visibility of these elements so that some things are visible outside
the package while others are hidden. You can also use packages to present different views of
your system's architecture. Well-structured packages are therefore loosely coupled and very
cohesive, with tightly controlled access to the package's contents.
OWNED ELEMENTS
A package may own other elements, including classes, interfaces, components,
nodes,collaborations, use cases, diagrams, and even other packages. Owning is a composite
relationship, which means that the element is declared in the package. If the package is
destroyed, the element is destroyed. Every element is uniquely owned by exactly one package.
Visibility
You can control the visibility of the elements owned by a package just as you can control the
visibility of the attributes and operations owned by a class. Typically, an element owned by a
package is public, which means that it is visible to the contents of any package that imports the
element's enclosing package. Conversely, protected elements can only be seen by children, and
private elements cannot be seen outside the package in which they are declared. In Figure
OrderForm is a public part of the package Client, and Order is a private part. A package
that imports Client can see OrderForm, but it cannot see Order. As viewed from the
outside, the fully qualified name of OrderForm would be Client::OrderForm.
Importing and Exporting
The public parts of a package are called its exports. For example, in Figure, the package GUI
exports two classes, Window and Form. EventHandler is not exported by
GUI;EventHandler is a protected part of the package.
The parts that one package exports are visible only to the contents of those packages that
explicitly import the package. In this example, Policies explicitly imports the package GUI.
GUI::Window and GUI::Form are therefore made visible to the contents of the package
Policies.
INTERFACES
Interfaces define a line between the specification of what an abstraction does and the
implementation of how that abstraction does it. An interface is a collection of operations that are
used to specify a service of a class or a component.
Relationships
Like a class, an interface may participate in generalization, association, and dependency
relationships. In addition, an interface may participate in realization relationships. Realization is a
semantic relationship between two classifiers in which one classifier specifies a contract that
another classifier guarantees to carry out.
REALIZATION
For Eg shows a set of objects drawn from the implementation of an autonomous robot. This
figure focuses on some of the objects involved in the mechanism used by the robot to
calculate a model of the world in which it moves. There are many more objects involved in a
running system, but this diagram focuses on only those abstractions that are directly involved
in creating this world view.
5(a)Briefly explain the basic building blocks of UML with notations? (10)
• UML is a standard language for writing software blueprints.
1) Things
2)Relationships
3) Diagrams
UML Things partitioning
1) Structural things:-The nouns of uml model such as
class, interface, use case, collaboration, active class, component, node etc
Class diagram :Shows a set of classes, interfaces and collaborations and their
relationships.
To model static design view of the system.
Contents:
Classes
Interfaces
Collaborations
Dependency, Generalization and association relationships.
Advancedclasses
Classifiers: a mechanism that describes structural and behavioral features.
It includes classes,interfaces,datatypes,signals,components,nodes,usecases and
subsystems
Multiplicity of a class
ExplainTemplate Classes
Module3
Kinds of Events
Events may be external or internal. External events are those that pass between the
system and its actors. For example, the pushing of a button and an interrupt from a
collision sensor are both examples of external events.
Internal events are those that pass among the objects that live inside the system. An
overflow exception is an example of an internal event.
Signals
A signal represents a named object that is dispatched (thrown) asynchronously by one
object and then received (caught) by another.
Exceptions are supported by most contemporary programming languages and are the
most common kind of internal signal that you will need to model.
A signal may be sent as the action of a state transition in a state machine or the sending
of a message in an interaction. The execution of an operation can also send signals.
2.Discuss the relationships used in the use case diagram?
Relationships in usecase diagram
Dependency, generalization, and association relationships
Generalization
child use case inherits the behavior and meaning of the parent use case
In a banking system the use case Validate User, might then have two specialized
children of this use case (Check password andRetinal scan),
An include relationship between use cases means that the base use case
explicitly incorporates the behavior of another use case at a location specified in
the base.
the base use case pulling behavior from the supplier use case
An extend relationship between use cases means that the base use case
implicitly incorporates the behavior of another use case at a location specified
indirectly by the extending use case.
Flat Sequence
Flat flow of control rendered using a stick arrowhead, to model the nonprocedural
progression of control from step to step. In this case, the message assertCall is specified as
the second message in the sequence.
We use flat sequences only when modelling interactions in the context of use
cases that involve the system as a whole, together with actors outside the system
4.Write short note on activity diagrams?
Activity diagrams are one of the five diagrams in the UML for modeling
the dynamic aspects of systems. An activity diagram is essentially a
flowchart, showing flow of control from activity to activity.
You use activity diagrams to model the dynamic aspects of a system. For
the most part, this involves modeling the sequential (and possibly
concurrent) steps in a computational process.
With an activity diagram, you can also model the flow of an object as it
moves from state to state at different points in the flow of control.
Activity diagrams may stand alone to visualize, specify, construct, and
document the dynamics of a society of objects, or they may be used to
model the
flow of control of an operation.
Explain steps
For example, Figure shows the state machine for the controller in a home security
system,which is responsible for monitoring various sensors around the perimeter of the house.
Internal Transitions
Once inside a state, you'll encounter events you'll want to handle without leaving the
state. These are called internal transitions, and they are subtly different from self-
transitions. Whenever you are in the state and that event is triggered, the
corresponding action is dispatched without leaving and then reentering the state.
Therefore, the event is handledwithout dispatching the state's exit and then entry
actions.
Deferred Events
A deferred event is a list of events whose occurrence in the state is postponed until a
state in which the listed events are not deferred becomes active, at which time they
occur and may trigger transitions as if they had just occurred.
Substates
A substate is a state that's nested inside another one. For example, a Heater might be in the
Heating state, but also while in the Heating state, there might be a nested state called
Activating. In this case, it's proper to say that the object is both Heating and Activating
9.How do we model threads and signals in UML?
In the UML, you model each independent flow of control as an active object that
represents a process or thread that can initiate control activity.
A process is a heavyweight flow that can execute concurrently with other processes; a thread
is a lightweight flow that can execute concurrently with other threads within the same
process.
In the UML, each independent flow of control is modeled as an active object. An active
object is a process or thread that can initiate control activity .
an active object is an instance of an active class.
Also as for every kind of object, active objects can communicate with one another by
passing messages
More often, THREAD is hidden inside a heavier-weight process and runs inside the
address space of the enclosing process. In Java, for example, a thread is a child of the
class Thread.
All the threads that live in the context of a process are peers of one another, contending
for the same resources accessible inside the process.
Threads are never nested inside one another.
ACTIVE CLASSES
You use active classes to model common families of processes or threads. In technical
terms, this means that an active object• an instance of an active class• reifies (is a
manifestation of) a
process or thread.
Communication
A use case diagram is a diagram that shows a set of use cases and actors and
their
relationships.
Use case diagrams commonly contain
· Use cases
· Actors
· Dependency, generalization, and association relationships
Like all other diagrams, use case diagrams may contain notes and constraints.
COMMON USES
You apply use case diagrams to model the static use case view of a system. This view
primarily
supports the behavior of a system• the outwardly visible services that the system
provides in the
context of its environment.
When you model the static use case view of a system, you'll typically apply use case
diagrams in
one of two ways.
1. To model the context of a system
Modeling the context of a system involves drawing a line around the whole system and
asserting
which actors lie outside the system and interact with it.Here, you'll apply use case
diagrams to
specify the actors and the meaning of their roles.
To model the context of a system,
Identify the actors that surround the system by considering which groups require
help
from the system to perform their tasks; which groups are needed to execute the
system's
functions; which groups interact with external hardware or other software
systems; and
which groups perform secondary functions for administration and maintenance.
Organize actors that are similar to one another in a
generalization/specializationhierarchy.
Where it aids understandability, provide a stereotype for each such actor.
Populate a use case diagram with these actors and specify the paths of
communication
from each actor to the system's use cases.
For example, Figure shows the context of a credit card validation system, with an
emphasis on the actors that surround the system. You'll find Customers, of which there
are two kinds (Individual customer and Corporate customer). These actors are the roles
that humans play when interacting with the system. In this context, there are also actors
that represent other institutions, such as Retail institution (with which a Customer
performs a card transaction to buy an item or a service) and Sponsoring financial
institution (which serves as the clearinghouse for the credit card account)
2.What are the notations used in activity diagram?What are its common
uses ?How is activity diagram different from state chart diagram? (15)
Activity diagrams are one of the five diagrams in the UML for modeling the dynamic
aspects of systems. An activity diagram is essentially a flowchart, showing flow of
control from activity to
activity.For the most part, this involves modeling the sequential (and possibly
concurrent) steps in a computational process.
An activity diagram shows the flow from activity to activity. Activity diagrams
commonly contain
· Activity states and action states
· Transitions
· Objects
Action States give any example
Triggerless Transitions
A fork may have one incoming transition and two or more outgoing transitions, each of
which represents an independent flow of control. a join represents the synchronization
of two or more concurrent flows of control. A join may have two or more incoming
transitions and one outgoing transition. Above the join, the activities associated with
each of these paths continues in parallel.
Common uses
1. To model a workflow
Explain the steps
2. To model an operation
Explain the steps
You can visualize those objects and messages involved in an interaction in two ways: by
emphasizing the time ordering of its messages, and by emphasizing the structural
organization of the objects that send and receive messages.
In the UML, the first kind of representation is called a sequence diagram; the
second kind of representation is called a collaboration diagram.
Both sequence diagrams and collaboration diagrams are kinds of interaction
diagrams.
To model a flow of control,
· Set the context for the interaction, whether it is the system as a whole, a class, or an
individual operation.
· Set the stage for the interaction by identifying which objects play a role; set their
initial
properties, including their attribute values, state, and role.
· If your model emphasizes the structural organization of these objects, identify the
links
that connect them, relevant to the paths of communication that take place in this
interaction. Specify the nature of the links using the UML's standard stereotypes and
constraints, as necessary.
· In time order, specify the messages that pass from object to object. As necessary,
distinguish the different kinds of messages; include parameters and return values to
convey the necessary detail of this interaction.
· Also to convey the necessary detail of this interaction, adorn each object at every
moment in time with its state and role.
FLOW OF CONTROL BY TIME
Modeling Flows of Control by Organization(Collaboration diagram)
A transition is a relationship between two states indicating that an object in the first
state will perform certain actions and enter the second state when a specified event
occurs and specified conditions are satisfied. A transition is rendered as a solid directed
line.
Transitions
A transition is a relationship between two states indicating that an object in the first
state will
perform certain actions and enter the second state when a specified event occurs and
specified
conditions are satisfied. On such a change of state, the transition is said to fire. Until the
transition
fires, the object is said to be in the source state; after it fires, it is said to be in the target
state. For
example, a Heater might transition from the Idle to the Activating state when an event
such
as tooCold (with the parameter desiredTemp) occurs.
A transition has five parts.
1. Source state -The state affected by the transition; if an object is in the source state,
an outgoing
transition may fire when the object receives the trigger event of the transition and if
the guard condition, if any, is satisfied
2. Event trigger -The event whose reception by the object in the source state makes the
transition
eligible to fire, providing its guard condition is satisfied
3. Guard condition A Boolean expression that is evaluated when the transition is
triggered by the
reception of the event trigger; if the expression evaluates True, the transition is
eligible to fire; if the expression evaluates False, the transition does not fire and if
there is no other transition that could be triggered by that same event, the event is
lost
4. Action An executable atomic computation that may directly act on the object that
owns the
state machine, and indirectly on other objects that are visible to the object
5. Target state -The state that is active after the completion of the transition
An active object is an object that owns a process or thread and can initiate control
activity. An active class is a class whose instances are active objects. A process is a
heavyweight flow that can execute concurrently with other processes. A thread is a lightweight
flow that can execute
concurrently with other threads within the same process. Graphically, an active class is rendered
as a rectangle with thick lines. Processes and threads are rendered as stereotyped active classes
(and also appear as sequences in interaction diagrams).
ACTIVE CLASS
Module4
In the UML, you model a framework as a stereotyped package. Zoom inside that package,
and
you'll see mechanisms that live in any of various views of a system's architecture
Figure illustrates such a framework, named CyclicExecutive. Among other things, this
framework includes a collaboration (CommonEvents) encompassing a set of event classes, along
with a mechanism (EventHandler) for processing these events in a cyclic fashion. A client that
builds on this framework (such as Pacemaker) could build on the abstractions in CommonEvents
via subclassing and could also apply an instance of the EventHandler mechanism.
Briefly Explain the steps
3.Distinguish design frameworks and design patterns
A pattern provides a common solution to a common problem in a given context.
You use patterns to specify mechanisms and frameworks that shape the architecture of your
system. In the UML, you will typically model design patterns• also called mechanisms• which
you can represent as collaborations. Similarly, you will typically model architectural patterns as
frameworks, which you can represent as stereotyped packages.The UML provides a graphical
representation for both kinds of patterns.
A mechanism is a design pattern that applies to a society of classes.
Frameworks
In the UML, you model a framework as a stereotyped package. Zoom inside that package,
and you'll see mechanisms that live in any of various views of a system's architecture
Briefly Explain the steps
4.List the common uses of component diagram?
Modeling Executables and Libraries
Modeling Tables, Files, and Documents
Modeling an API
Modeling Source Code
Modeling source code
· Modeling executable releases
· Modeling physical databases
· Modeling adaptable systems
· Forward and reverse engineering
RUP
Like Waterfall, the Rational Unified Process (RUP), originated by Rational Software and
later by IBM, is also process heavy, but is an iterative approach that takes into account
the need to accommodate change and adaptability during the development process.
Like Waterfall, RUP has a series of phases and milestones that flow into each other.
1. Inception, where the project's scope, estimated costs, risks, business case,
validated, the project environment is further defined and the project team is
configured.
documentation is produced.
4. Transition, where the software is system tested, user tested, reworked and
deployed.
Essay questions
1)With suitable example explain collaboration diagram & component
Diagram? (15)
COLLABORATION
A collaboration names a society of classes,interfaces, and other elements that work together to
provide some cooperative behavior that's bigger than the sum of all its parts.
You use collaborations to specify the realization of use cases and operations, and to model the
architecturally significant mechanisms of your system
COMPONENT DIAGRAM
Component diagrams are one of the two kinds of diagrams found in modeling the physical
aspects of object-oriented systems. A component diagram shows the organization and
dependencies among a set of components.
Common Uses
1. To model source code
With most contemporary object-oriented programming languages, you'll cut code using integrated
development environments that store your source code in files. You can use component
diagrams to model the configuration management of these files, which represent work-product
components.
Artifacts
Models-List Few models
Business model - Establishes an abstraction of the organization
Domain model - Establishes the context of the system
Use case model -Establishes the system's functional requirements
Other Artifacts
The Rational Unified Process's artifacts are categorized as either management artifacts or
technical artifacts. The Rational Unified Process's technical artifacts may be divided into four
main sets.
1. Requirements set -Describes what the system must do
2. Design set- Describes how the system is to be constructed
3. Implementation set -Describes the assembly of developed software components4.
Deployment set - Provides all the data for the deliverable configuration
(b) Distinguish design frameworks and design patterns (5)
Refer qstn no 3 and 5 (short ans qstn)
Phases
Inception
During the inception phase, you establish the business case for the system and delimit the
project's scope. The business case includes success criteria, risk assessment, estimates of the
resources needed, and a phase plan showing a schedule of major milestones. During inception,
it's common to create an executable prototype that serves as a proof of concept.
At the end of the inception phase, you examine the life cycle objectives of the project and decide
whether to proceed with full-scale development.
Elaboration
The goals of the elaboration phase are to analyze the problem domain, establish a sound
architectural foundation, develop the project plan, and eliminate the highest risk elements of the
project. Architectural decisions must be made with an understanding of the whole system. This
implies that you describe most of the system's requirements. To verify the architecture, you
implement a system that demonstrates the architectural choices and executes significant use
cases.
At the end of the elaboration phase, you examine the detailed system objectives and scope, the
choice of architecture, and the resolution of major risks, and decide whether to proceed with
construction.
Construction
During the construction phase, you iteratively and incrementally develop a complete product that
is ready to transition to its user community. This implies describing the remaining requirements
and acceptance criteria, fleshing out the design, and completing the implementation and test of
the software.
At the end of the construction phase, you decide if the software, sites, and users are all ready to
go operational.
Transition
During the transition phase, you deploy the software to the user community. Once the system has
been put into the hands of its end users, issues often arise that require additional development in
order to adjust the system, correct some undetected problems, or finish some features that have
been postponed. This phase typically starts with a beta release of the system, which is then
replaced with the production system.
At the end of the transition phase, you decide whether the life cycle objectives of the project have
been met and determine if you should start another development cycle. This is also a point at
which you wrap up the lessons learned on the project in order to improve your development
process, which will be applied to the next project.
Iterations
Each phase in the Rational Unified Process can be further broken down into iterations. An
iteration is a complete development loop resulting in a release (internal or external) of an
executable product constituting a subset of the final product under development, which then is
grown incrementally from iteration to iteration to become the final system. Each iteration goes
through the various process workflows, although with a different emphasis on each process
workflow, depending on the phase. During inception, the focus is on requirements capture. During
elaboration, the focus turns toward analysis and design. In construction, implementation is the
central activity, and transition centers on deployment.
7.a)State and xplain the different architectural views (7)
SOFTWARE ARCHITECTURE
A system's architecture is perhaps the most important artifact that
can be used to manage these different viewpoints and so control the iterative and
incremental
development of a system throughout its life cycle.
Architecture is the set of significant decisions about
· The organization of a software system
· The selection of the structural elements and their interfaces by which the system is
composed
· Their behavior, as specified in the collaborations among those elements
· The composition of these structural and behavioral elements into progressively larger
Subsystems
The architectural style that guides this organization: the static and dynamic elements
and
their interfaces, their collaborations, and their composition
ARCHITECTURAL VIEWS
The use case view of a system encompasses the use cases that describe the
behavior of the
system as seen by its end users, analysts, and testers. This view doesn't really specify the
organization of a software system. Rather, it exists to specify the forces that shape the
system's
architecture
The process view of a system encompasses the threads and processes that
form the system's concurrency and synchronization mechanisms. This view primarily
addresses the performance,scalability, and throughput of the system.
The implementation view of a system encompasses the components and
files that are used to assemble and release the physical system. This view primarily
addresses the configuration
management of the system's releases, made up of somewhat independent components
and filesthat can be assembled in various ways to produce a running system
The deployment view of a system encompasses the nodes that form the system's
hardware
topology on which the system executes. This view primarily addresses the distribution,
delivery,and installation of the parts that make up the physical system
Structure of RUP
The process has two structures or, if you prefer, two dimensions:
The horizontal dimension represents time and shows the lifecycle aspects of the
process as it unfolds.
The vertical dimension represents core process disciplines (or
workflows), which logically group software engineering activities by their
nature.