Oomd1 QB Ans 1 2
Oomd1 QB Ans 1 2
In object-oriented modeling and design (OOMD), events and states are important
concepts that can be used to represent the dynamic behavior of an object or system.
Events:
An event is a change or occurrence that happens in a system. It can be triggered by
external factors, such as user input or external data, or by internal actions within the
system. Events can be used to model the behavior of an object or system over time. For
example, consider a simple model of a door. The door class might include events such
as "doorOpen" and "doorClose", which represent the action of opening and closing the
door. These events might be triggered by external factors, such as a user pushing the
door open or pulling it closed, or by internal factors, such as the door sensing that it is
obstructed and stopping its movement.
States:
A state is a snapshot of the characteristics and behavior of an object or system at a
particular moment in time. States can be used to represent the different possible
configurations or conditions of an object or system. For example, continuing with the
door example, the door class might include states such as "open" and "closed". These
states represent the different possible configurations of the door, and can be used to
model the door's behavior over time. For example, if the door is in the "open" state, it
might transition to the "closed" state when the "doorClose" event is triggered.
4. Explain the following elements of data flow diagrams: i) Processes ii) Data Flows iii)
Actors
i) Processes: In a data flow diagram, a process is a unit of work that transforms or manipulates
data as it flows through the system. A process is represented by a box with rounded corners,
and is typically labeled with a verb or verb phrase that describes the transformation or
manipulation that it performs.
For example, a process might be labeled "calculate total" or "store data" .
ii) Data Flows: In a data flow diagram, a data flow represents the movement of data between
processes, actors, or external systems. A data flow is represented by an arrow pointing from
the source of the data to its destination, and is labeled with the name of the data being
transferred. Data flows can be either physical, representing the movement of physical data
such as documents or files, or logical, representing the flow of data within a system or
application.
iii) Actors: In a data flow diagram, an actor represents a person, department, or external system
that interacts with the system being modeled. Actors are represented by stick figures and are
typically labeled with the name of the actor or the role that they play in the system. Actors can
be either sources or destinations of data flows, depending on their role in the system
5. Describe the overview of analysis process with neat diagram.
6. List the steps in construction of an Object Model. Explain how to identify the object
classes from application domain.
1. dentify objects and what they are: Figure out what things are part of the system.
2. Create a list about each thing: Make a detailed list describing each of these things.
3. See how things are connected: Understand how these objects relate or connect to each
other.
4. Describe qualities and connections: Define the specific qualities of each thing and how
they're connected to others.
5. Organize and simplify: Group similar things together to make the list easier to
understand.
6. Ensure easy access to information: Make sure it's easy to find the information you
need.
7. Keep improving and refining: Continuously make the list better by fixing mistakes and
making it clearer.
8. Group things logically: Arrange the things into logical groups or sections for better
organization.
To identify the object classes from the application domain, you can follow these steps:
1. Identify the key entities in the domain: Start by identifying the key entities or concepts
that are relevant to the problem domain. These might include customers, products,
orders, invoices, etc.
2. Determine the attributes of the entities: Next, determine the attributes or properties
that each entity has. For example, a customer entity might have attributes such as
name, address, and phone number.
3. Identify the relationships between the entities: Look for relationships between the
entities you have identified. For example, a customer might have a relationship with an
order, or a product might have a relationship with an invoice.
4. Define the object classes: Based on the entities and their attributes and relationships,
define the object classes that will represent them in the object model. Each object class
should represent a single entity or concept in the domain, and should include the
attributes and relationships that are relevant to that entity.
7. Explain structural things in UML.
Name
raphical
otation
Attributes
Operatio
ns
Name
Name
Name
Name
Attributes
Operatio
ns
Name
Name
8. Explain the Conceptual Model of UML.
notebook
9. Explain interaction diagram, its contents and common uses.
notebook
10. Explain different kinds of events with respect to behavioral modeling
11. Explain deployment diagram, its uses and uses.
Deployment Diagrams
In this chapter
• Modeling an embedded system
• Modeling a client/server system
• Modeling a fully distributed system
• Forward and reverse engineering
With the UML, you use deployment diagrams to visualize the static aspect of these
physical
nodes and their relationships and to specify their details for construction, as in Figure
30-1.
Figure 30-1 A Deployment Diagram
Like all other diagrams, deployment diagrams may contain nodes and constraints.
Deployment diagrams may also contain components, each of which must live on some
node.
Deployment diagrams may also contain packages or subsystems, both of which are
used to
group elements of your model into larger chunks. Sometimes, you'll want to place
instances in
your deployment diagrams, as well, especially when you want to visualize one instance
of a
family of hardware topologies.
Common Uses
1. Modeling Embedded Systems:
These are systems where software interacts deeply with hardware to control
devices like sensors, actuators, etc. Deployment diagrams help in visualizing and
specifying the processors and devices that constitute such embedded systems.
2. Modeling Client/Server Systems: In architectures where there's a clear
separation between the user interface (client) and persistent data storage
(server), deployment diagrams aid in illustrating the network connectivity
between clients and servers. They depict the physical distribution of software
components across nodes in this architecture.
3. Modeling Fully Distributed Systems: These systems span multiple nodes
extensively, often across various geographical locations. They might host
multiple versions of software components, some of which might migrate across
nodes. Deployment diagrams help in visualizing the system's topology and how
components are distributed across various nodes.
Question Bank 2
Question
Question
No.
Subjective Type Questions
Class Diagram
A class diagram shows a set of classes, interfaces, and collaborations and their relationships.
Class diagrams are the most common diagram found in modeling object-oriented systems.
You use class diagrams to illustrate the static design view of a system. Class diagrams that
include active classes are used to address the static process view of a system.
Class diagrams commonly contain the following things:
• Classes
• Interfaces
• Collaborations
• Dependency, generalization, and association relationships
Object Diagram An object diagram shows a set of objects and their relationships. You use
object diagrams to illustrate data structures, the static snapshots of instances of the things
found in class diagrams. Object diagrams address the static design view or static process
view of a system just as do class diagrams, but from the perspective of real or prototypical
cases.
Object diagrams commonly contain
• Objects • Links
3. Write note on Scenarios and event traces.
4. Explain the following elements of data flow diagrams: i) Data Stores ii) Control
Flows iii) Nested Data Flow Diagrams
5. Explain the several phases of the OMT Methodology.
6. Explain the impact of an object-oriented approach.
7. Explain the following terms with respect to UML –
i) Generalization ii) Aggregation iii) Multiplicity
8. Explain the architecture of UML
9. Explain the following terms with respect to sequence diagram:
i) Object lifetime
First, there is the object lifeline. An object lifeline is the vertical dashed line that represents
the existence of an object over a period of time. Most objects that appear in an interaction
diagram will be in existence for the duration of the interaction, so these objects are all
aligned at the top of the diagram, with their lifelines drawn from the top of the diagram to
the bottom. Objects may be created during the interaction. Their lifelines start with the
receipt of the message stereotyped as create. Objects may be destroyed during the
interaction. Their lifelines end with the receipt of the message stereotyped as destroy (and
are given the visual cue of a large X, marking the end of their lives). Note If an object
changes the values of its attributes, its state, or its roles, you can place a copy of the object
icon on its lifeline at the point the change occurs, showing those modifications.
ii) Focus of Control
. The focus of control is a tall, thin rectangle that shows the period of time during which an
object is performing an action, either directly or through a subordinate procedure. The top
of the rectangle is aligned with the start of the action; the bottom is aligned with its
completion (and can be marked by a return message). You can show the nesting of a focus
of control (caused by recursion, a call to a self-operation, or by a callback from another
object) by stacking another focus of control slightly to the right of its parent (and can do so
to an arbitrary depth). If you want to be especially precise about where the focus of control
lies, you can also shade the region of the rectangle during which the object's method is
actually computing (and control has not passed to another object).
10. Explain the following terms with respect to Activity diagram:
i) Action states
In the flow of control modeled by an activity diagram, things happen. You might evaluate
some expression that sets the value of an attribute or that returns some value. Alternately,
you might call an operation on an object, send a signal to an object, or even create or
destroy an object. These executable, atomic computations are called action states because
they are states of the system, each representing the execution of an action. As Figure 19-2
shows, you represent an action state using a lozenge shape (a symbol with horizontal top
and bottom and convex sides). Inside that shape, you may write any expression.
Action states can't be decomposed. Furthermore, action states are atomic, meaning that
events may occur, but the work of the action state is not interrupted. Finally, the work of an
action state is generally considered to take insignificant execution time.
ii)Transitions
Triggerless transitions may have guard conditions, meaning that such a transition will fire
only if that condition is met. When the action or activity of a state completes, flow of control
passes immediately to the next action or activity state. You specify this flow by using
transitions to show the path from one action or activity state to the next action or activity
state. In the UML, you represent a transition as a simple directed line, as Figure 19-4 shows.
iii) Branching
Branches are a notational convenience, semantically equivalent to multiple transitions with
guards. Simple, sequential transitions are common, but they aren't the only kind of path
you'll need to model a flow of control. As in a flowchart, you can include a branch, which
specifies alternate paths taken based on some Boolean expression. As Figure 19-5 shows,
you represent a branch as a diamond. A branch may have one incoming transition and two
or more outgoing ones. On each outgoing transition, you place a Boolean expression, which
is evaluated only once on entering the branch. Across all these outgoing transitions, guards
should not overlap (otherwise, the flow of control would be ambiguous), but they should
cover all possibilities (otherwise, the flow of control would freeze).
As a convenience, you can use the keyword else to mark one outgoing transition,
representing the path taken if no other guard expression evaluates to true. Branching and
iteration are possible in interaction diagrams. You can achieve the effect of iteration by using
one action state that sets the value of an iterator, another action state that increments the
iterator, and a branch that evaluates if the iteration is finished.
pattern
▪ Whether you're architecting a new system or evolving an existing one, you never
really start from scratch.
▪ Rather, experience and convention will lead you to apply common ways to solve
common problems.
▪ For example , if you are building a system for solving cryptograms, one proven way
to organize your system is to use a blackboard architecture, which is well-suited to
attacking intractable problems in opportunistic ways.
▪ these are example of patterns common solutions to common problems in a given
context.
▪ In all well-structured systems, you'll find lots of patterns at various levels of
abstraction.
▪ By making the patterns in your system explicit, you make your system far more
understandable and easier to evolve and maintain
Frameworks
▪ A framework is an architectural pattern that provides an extensible template for
applications within a domain.
▪ For example, one common architectural pattern you'll encounter in real time
systems is a cyclic executive, which divides time into frames and subframes, during
which processing takes place under strict deadlines.
▪ Choosing this pattern versus its alternative (an even-driven architecture) colors your
entire system. Because this pattern (and its alternative) is so common, it makes
sense to name it as a framework.
▪ A framework is bigger than a mechanism.
▪ In fact, you can think of a framework as a kind of micro-architecture that
encompasses a set of mechanisms that work together to solve a common problem
for a common domain.
▪ When you specify a framework, you specify the skeleton of an architecture,
together with the slots, tabs, knobs, and dials that you expose to users who want to
adapt that framework to their own context.
▪ 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
Question Bank 3
Subjective Type Questions
1. Explain the three models of OMT.
2. Explain the following terms:
i) Multiplicity
9. Explain include and extend relationships in use case diagram with suitable example.
•
10. Explain Activity diagram with example.
change the wallpaper. The various components used in the diagram and the standard notations
initial state. Figure – notation for initial state or start state A process can have
only one initial state unless we are depicting nested activities. We use a black filled
circle to depict the initial state of a system. For objects, this is the state when they are
instantiated. The Initial State from the UML Activity Diagram marks the entry point and
the initial Activity State. For example – Here the initial state is the state of the system
output arrows.
Figure – notation for decision node
Figure – guards
being used next to a decision node The statement must be true for the control to shift
along a particular direction. Guards help us know the constraints and conditions which
determine the flow of a process.
6. Fork – Fork nodes are used to support concurrent activities.
10. Time Event –Figure– time event notation We can have a scenario where an event takes
some time to complete. We use an hourglass to represent a time event. For example –
Let us assume that the processing of an image takes a lot of time. Then it can be
represented as shown below.
Figure – an activity diagram using time event
11. Final State or End State – The state which the system reaches when a particular
process or activity ends is known as a Final State or End State. We use a filled circle
within a circle notation to represent the final state in a state machine diagram. A
system or a process can have multiple final states.
Figure – notation for final state
Types of Components:
a. Executable Components: These are components that contain executable code or behavior.
They encapsulate algorithms, processes, or other executable units.
b. Reusable Components: Components designed for reuse across multiple systems or within
the same system. They encapsulate generic functionalities that can be used in various contexts.
c. Support Components: These components provide supportive or auxiliary functionalities
required by other components. They often encapsulate utility functions, services, or resources.
Question Bank 4
3. Draw and explain the data flow diagram for ATM transaction process.
4. List and explain the steps involved in designing the algorithms.
5. Explain in detail the actions taken by designer in design optimization.
6. Explain the behavioral things in UML.
7. Explain the Class Diagram, its properties , contents and common uses.
8. Draw and explain use case diagram for credit card validation system.
9. Explain collaboration diagram with example.
10. Explain types of components and standard stereotypes that apply to components.
11. Explain relationship between a component and its interfaces.
Question Bank 5
Multiple Choice Questions
Question
Question
No.
1 The ______ model describes those aspects of a system concerned with time and
sequencing of operations
A. object
B. dynamic
C. functional
D. none of these
2 Association are inherently
A. bidirectional
B. unidirectional
3 A _______ is a logical construct for grouping classes, association, and generalizations.
A. module
B. sheet
C. object
D. generalization
4 In event trace diagram, a vertical line represents _________ and horizontal arrow
represents _________ .
A. State, event
B. Object, event
C. State, data flow
D. Function , data flow
5 One-shot state diagrams represent objects with ________ lives. A.
Finite
B. Infinite
C. Both (A) and (B)
D. None of the above
6 A process can be expanded into another ____________ .
A. Process
B. State diagram
C. Object diagram