Professional Documents
Culture Documents
1
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
2
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
3
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
4
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
5
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
6
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
7
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
8
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
9
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
10
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
11
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
12
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
13
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
14
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
15
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
16
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
17
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
18
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
19
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
20
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
21
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
22
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
23
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
24
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
UNIT 2 & 3
1) Discuss OOAD for Web Engineering.
Ans:
1.Object-Oriented Approach: OOAD promotes the use of objects and classes
to model real-world entities. In web engineering, this translates to using
objects to represent various components of a web application, such as users,
products, or orders.
2. Abstraction: Abstraction involves simplifying complex systems by focusing
on relevant details. In web engineering, this means identifying the essential
features and functionalities of a web application and modeling them as
abstract classes or interfaces.
3. Inheritance: Inheritance allows you to create new classes based on existing
ones. In web development, you can use inheritance to build upon existing
components or frameworks.
4. Encapsulation: Encapsulation involves bundling data and methods that
operate on that data within a single unit (class). In web engineering,
encapsulation helps in creating modular and maintainable code.
5. Polymorphism: Polymorphism allows different classes to be treated as
instances of a common superclass. In web applications, this can be seen when
handling various HTTP requests.
6. Use of Design Patterns: OOAD often involves applying design patterns like
MVC (Model-View-Controller) or MVVM (Model-View-ViewModel) to organize
code and separate concerns.
7. UML Diagrams: Unified Modeling Language (UML) diagrams, such as class
diagrams, sequence diagrams, and use case diagrams, are valuable tools in
OOAD for visualizing and documenting the design of web applications.
8. Iterative Development: OOAD encourages an iterative and incremental
approach to development. In web engineering, this means continuously
refining and expanding the design as requirements evolve.
9. Testing and Validation: OOAD emphasizes early testing and validation of
design concepts.
25
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
27
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
28
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
29
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
30
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
Server-side
Server hardware and operating system environment must
be specified
Interoperability considerations on the server-side must be
considered
Appropriate interfaces, communication protocols and
related collaborative information must be specified
Client-side
Browser configuration issues must be identified
Testing requirements should be defined
31
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
7)Which are the Building Blocks of UML? Explain any one of them.
Ans:
UML is composed of three main building blocks, i.e., things,
relationships, and diagrams. Building blocks generate one complete UML
model diagram by rotating around several different blocks.
The basic UML building blocks are enlisted below:
(1) Things:
A. Structural
B. Behaviour
C. Grouping
D. Annotational
(2) Relationship:
A. Dependency
B. Association
C. Generalisation
D. Realization
32
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
(3) Diagrams:
A. Class Diagram
B. Object Diagram
C. Use Cases Diagram
D. Behaviour Diagram
E. Sequence Diagram
F. Statechart Diagram
Diagrams:
The diagrams are the graphical implementation of the
models that incorporate symbols and text. Each symbol
has a different meaning in the context of the UML
diagram.
(1) Class diagram:
o The most common diagram found in OOAD, shows
a set of classes, interfaces, collaborations and their
relationships. Models the static view of the system.
(2) Object diagram:
o shows the set of objects and their relationships.
(3) Use case diagram:
o shows a set of “Use Cases”, the “actors” and their
relationships. Models WHAT the system is expected
to do.
(4) Sequence diagram:
o models the flow of control by time-ordering;
depicts the interaction between various objects by
of messages passed, with a temporal dimension to
it.
33
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
9)List out common mechanisms in UML and explain any two with
example.
Ans:
Four common mechanism that apply consistently through out the
language.
o Specifications
o Adornments
o Common divisions
o Extensibility mechanisms
i. Adornments:
Most elements in the UML have a unique and direct graphical
notation that provides a visual representation of the most
important aspects of the element.
34
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
+execute()
+rollback()
#priority()
-timestamp()
ii. Specification:
UML is more than graphical language. Behind every part of its
graphical notation there is a specification that provides a
textual statement of the syntax and semantics of the building
block.
Example:
Behind a class icon is a specification that provides the full set
of attributes, operations and behaviors that class renders.
35
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
Inception is the first phase of the process, when the seed idea for
the development is brought up to the point of being entered into
the elaboration phase.
ii. Elaboration:
It is the second phase of the process, when the product vision and
its architecture are defined.
In this phase, the system’s requirements are defined and arranged
by certain criteria.
iii. Construction:
It is the third phase of the process, when the software is actually
constructed and being ready for transitioning to user community.
Here also the system’s requirements and evaluation criteria are
constantly reexamined against business needs.
iv. Transition:
It is the fourth phase of the process, when the software is turned
into the hands of user community.
Even during this period, the system is continuously improved, bugs
are rectified and features that were not there in earlier release are
added.
Implementation
Design view
view
36
Use case view
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
37
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
(I)Dependency:
Dependency is a kind of relationship in which a
change in target element affects the source element,
or simply we can say the source element is
dependent on the target element.
It is denoted by a dotted line followed by an arrow at
one side as shown below,
(II) Association:
A set of links that associates the entities to the UML
model. It tells how many elements are actually taking
part in forming that relationship.
It is denoted by a dotted line with arrowheads on
both sides to describe the relationship with the
element on both sides.
(III) Generalization:
It portrays the relationship between a general thing
(a parent class or superclass) and a specific kind of
that thing (a child class or subclass). It is used to
describe the concept of inheritance.
(IV) Realization:
It is a semantic kind of relationship between two
things, where one defines the behavior to be
carried out, and the other one implements the
mentioned behavior. It exists in interfaces.
It is denoted by a dotted line with an empty
arrowhead at one side.
38
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
o One to One
o One to Many
o Many to One
o Many to Many
Example:
39
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
2. Describes a relationship where one class 2. Describes a relationship where one class
is a specialized version of another class. has another class as a component or part.
5. Example: if you have a class "Vehicle" 5. Example: if you have a class "Car" and
and another class "Car," you might say that another class "Engine," you might say that
"Car is a kind of Vehicle." In this case, "Car has an Engine." In this case, "Engine" is
"Vehicle" is the superclass, and "Car" is the a component of the "Car" class.
subclass inheriting characteristics from
"Vehicle."
41
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
42
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
(2) Attributes:
Attributes represent the data or properties that objects of a class
possess. They are listed in the attribute compartment of the class
and are typically shown with a name and a data type.
(3) Method:
Methods represent the behaviors or operations that objects of a
class can perform. They are listed in the method compartment of
the class and include the method name, parameters, and return
type.
(4) Relationships:
Class diagrams depict the relationships between classes.
43
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
44
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
45
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
46
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
47
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
2.Customer class:
- Represents a customer with attributes such as customer ID,
name, email, and address.
3.Product class:
48
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
5.Shopping cart:
- Represents a cart item, check out, cart details.
This is a basic representation, and in a real-world scenario, you
would likely have additional classes and relationships, such as User,
Payment, Shipping, and more, to capture the full complexity of a
B2C shopping website.
49
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
50
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
51
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
52
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
UNIT – 4
53
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
54
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
55
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
56
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
57
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
4. Focus of Control:
Represents the flow of control between different lifelines. It helps
to visualize the order of message execution.
5. Return Messages:
Indicate the response from the receiver to the sender after the
execution of a synchronous message.
Example for student login system:
58
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
Ans:
In the context of UML (Unified Modeling Language) and sequence
diagrams, the "focus of control" refers to the period during which an
object is actively processing a message or performing an action. It is
associated with the concept of an activation bar on an object's lifeline.
1. Activation Bar:
The activation bar is a graphical representation associated with a
lifeline on a sequence diagram. It is often depicted as a box or
vertical bar along the lifeline.
2. Period of Activity:
The activation bar represents the time interval during which the
object associated with the lifeline is actively engaged in processing
a message or performing an action.
3. Visualizing Execution:
The activation bar helps visualize when an object is in control and
actively executing a particular part of the interaction. It provides a
way to understand the flow of control during the sequence of
messages.
4. Sequential Flow:
In a sequence diagram, the focus of control moves sequentially
along the lifeline as messages are processed. When a message is
received, the focus of control shifts to the activation bar
associated with the receiving object.
59
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
62
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
9. Documentation:
Interaction diagrams serve as part of the documentation for a
system. They capture the dynamic aspects of the system,
providing insights into its behavior that can be referenced by
current and future development teams.
63
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
There are two main types of associations used to connect actors and use
cases: 1. Association Relationship,
2. Include Relationship
1. Association Relationship:
The association relationship is the primary relationship used to
connect actors and use cases. It is represented by a line
connecting an actor to a use case. The association line may include
an arrow indicating the direction of the relationship.
2. Include Relationship:
The include relationship is used to show that one use case includes
the behaviour of another use case. It is represented by a dashed
line with an "include" keyword. This relationship is often used to
indicate that a use case includes the behaviour of another use
case under certain conditions.
64
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
65
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
66
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
67
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
68
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
69
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
70
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
71
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
72
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
Joining:
The join symbol in an activity diagram is represented by a small bar
enclosed in a circle, and it indicates the point where multiple parallel
flows converge back into a single flow of control. It represents the
synchronization point where the parallel activities are joined.
Example:
This example at the left of the figure indicates that a join is used to
synchronize the processing of the ship order and send invoice
behaviours.
Here, when both have been completed, control is passed to close order.
73
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
74
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
75
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
76
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
77
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
78
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
79
OBJECT ORIENTED ANALYSIS AND DESIGN WITH UML
81