0% found this document useful (0 votes)
64 views

UML Complete Week 7 and Week 8

Uploaded by

lovenishthakur69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

UML Complete Week 7 and Week 8

Uploaded by

lovenishthakur69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 114

Object-Oriented Design using UML

1
Introduction
• Object-oriented design (OOD) techniques are now extremely
popular:
–Inception in early 1980’s and nearing maturity.

–Widespread acceptance in industry and academics.

–Unified Modelling Language (UML) became an ISO standard


(ISO/IEC 19501) in 2004.
Object Modelling Using UML
• UML is a modelling language.
• Not a system design or development methodology

• Used to document object-oriented analysis


and design results.
• Independent of any specific design
methodology.
UML Origin
• OOD in late 1980s and early 1990s:
− Different software development houses were using different
notations.
− Methodologies were tied to notations.

• UML developed in early 1990s:


− To standardize the large number of object-oriented modelling
notations that existed.
UML Lineology
• Based Principally on:
− OMT [Rumbaugh 1991]
− Booch’s methodology[Booch 1991]
− OOSE [Jacobson 1992]
− Odell’s methodology[Odell 1992]
− Shlaer and Mellor [Shlaer 1992]
UML as A Standard
• Adopted by Object Management Group (OMG) in 1997.
• OMG is an association of industries
• Promotes consensus notations and techniques
• UML also being used outside software development
area:
− Example car manufacturing
History of UML UML 2.0 Industrialization

Standardization
UML 1.1

public
feedbac UML
UML 0.9
0.9 && 0.91
0.91
Unification
k
Unified method 0.8

Booch'93 OMT-2

Other methods Booch'91 OMT-1 OOSE Fragmentation


Developments to UML
• UML continues to UML 2.0 2003
develop, due to: Application
to embedded
– Refinements systems
UML 1.X
– Making it applicable to
new contexts
UML 1.0 1997
Why are UML Models Required?
Modelling is an abstraction mechanism:
− Capture only important aspects and ignores the rest.
− Different models obtained when different aspects are
ignored.
− An effective mechanism to handle complexity.
UML is a graphical modelling technique
Easy to understand and construct
UML Diagrams
Nine diagrams in UML1.x :
− Used to capture 5 different views of a system.
Views:
− Provide different perspectives of a software system.
Diagrams can be refined to get the actual implementation
of a system.
Views of a system:
UML
− User’s view Model
− Structural view Views

− Behavioral view
− Implementation view
− Environmental view
Diagrams
Behavioural View
Structural View - Sequence Diagram
and views
in UML
- Class Diagram - Collaboration Diagram
- Object Diagram - State-chart Diagram
- Activity Diagram
User’s View
-Use Case
Diagram

Implementation View Environmental View


- Component Diagram - Deployment Diagram
• Class Diagram
Structural
– set of classes and their relationships.
Diagrams
• Object Diagram
– set of objects (class instances) and their relationships
• Component Diagram
– logical groupings of elements and their relationships
• Deployment Diagram
– set of computational resources (nodes) that host each component.
• Use Case Diagram
– high-level behaviors of the system, user Behavioral
goals, external entities: actors
• Sequence Diagram Diagrams
– focus on time ordering of messages
• Collaboration Diagram
– focus on structural organization of objects
and messages
• State Chart Diagram
– event driven state changes of system
• Activity Diagram
– flow of control between activities
Are All Views Required for Developing A
NO Typical System?
For a simple system:
− Use case diagram, class diagram and one of the interaction diagrams
only.
State chart diagram:
− when class has significant states.
− When states are only one or two, state chart model becomes trivial

Deployment diagram:
− In case several hardware components used to develop the system.
Use Case Modelling

9/6/2018
Use Case Model Behavioural View
Structural View - Sequence Diagram

• Consists of a set of “use cases” - Class Diagram


- Object Diagram
- Collaboration Diagram
-State-chart Diagram
- Activity Diagram
User’s View
-Use Case
Diagram

• It is the central model: Implementation View


- Component Diagram
Environmental View
- Deployment Diagram

–Other models must conform to this model

–Not really an object-oriented model, it is a functional model


of a system
A Use Case
• A case of use: A way in which a system can be used by the
users to achieve specific goals
• Corresponds to a high-level requirement.
• Defines external behavior without revealing internal structure
of system
• Set of related scenarios tied together by a common goal.
–Use cases for a Library information system
•issue-book
•query-book
•return-book Example
Use Cases
•create-member
•add-book, etc.
Are All Use Cases Independent?
• Use cases appear independent of each other
• However, Implicit dependencies may exist
• Example: In Library Automation System, renew-book and
reserve-book are independent use cases.
–But in actual implementation of renew-book--- A check is made to
see if any book has been reserved using reserve-book.
An Example Use Case Diagram

Play Move

Tic-tac-toe game
Player

Use case model


Why Develop A Use Case Diagram?
• Serves as requirements specification
• How are actor identification useful in software
development?
–Identifies different categories of users:
• Helps in implementing appropriate interfaces for each category
of users.
• Helps in preparing appropriate documents (e.g. users’
manual).
• Represented in a use case diagram Representation of
• A use case is represented by an ellipse Use Cases

• System boundary is represented by a rectangle


• Users are represented by stick person icons (actor)
• Communication relationship between Backup

actor and use case by a line Play Move <<external


system>>
Tic-tac-toe game
Player
• External system by adding a stereotype
What is a Connection?
• A connection is an association between an actor
and a use case.
Play Move

• Depicts a usage relationship Tic-tac-toe game

• Connection does not indicate data flow


Relationships between Use Cases and Actors
• Association relation indicates that the actor and the
corresponding use case communicate with one another.

update
grades

faculty
Another Example Use Case Diagram

Video Store Information


System

Rent
Videos
Clerk <<external system>>
Credit Authorization
. . . Service
Yet Another Use
Telephone Order System
Case Example
Check
Status Salesperson

Place
Order

Fill
Shipping
Orders
Customer Clerk

Establish
credit

Supervisor
Factoring Use Cases
• Two main reasons for factoring:
–Complex use cases need to be factored into simpler use cases
–Helps represent common behavior across different use cases
• Three ways of factoring:
–Generalization
–Include
–Extend
Generalization
• The child use case inherits the
parent
behavior of the parent use case.
–The child may add to or override some
child
of the behavior of its parent.
Registration
Generalization
Example 1

Under-graduate Graduate
registration registration
Factoring Use Cases Using Generalization

Pay membership fee

Pay through credit card Pay through library pay card


<<include>> Common
Base use case
use case
Factoring Use
Cases Using
Include
Base use case 2 Base use case 1

<<include>>
<<include>>
<<include>>
<<include>>

Common use case 1 Common use case 2 Common use case 3


Issue Book Renew Book

<<include>>
<<include>>

Example of Factoring
Use Cases Using
Check Reservation Include
Example Factoring A Use Case Using
Extend

Order <<extend>> Show


Item Catalog
Extension Point
• The base use case may include/extend other use cases:
– At certain points, called extension points.

• Note the direction of the arrow

<<extend>>
Perform Sale Product is a gift
Gift wrap
After checkout Product
Order
Supply Product
Customer Data Arrange
Payment
<<include>>
<<include>>
<<include>>
Place Order
Cash Credit
Payment Payment
Sales Person
<<extend>>
Salesperson asks for catalog

Use Case Relationships Request


Catalog
• Video Store Information System supports the following
business functions: Example 1: Video Store Information System
– Recording information about videos the store owns
• This database is searchable by staff and all customers
– Information about a customer’s borrowed videos
• Access by staff and customer. It involves video database searching.
– Staff can record video rentals and returns by customers. It involves
video database searching.
– Staff can maintain customer and video information.
– Managers of the store can generate various reports.
Video Store Information System

Rent/Return
Videos
«include»

Staff
Customer
Search for
Videos
Maintain
Customers
«include»

Maintain Example 1:
Videos
Solution
Generate
Manager Reports
Name
Actors Use Case
Trigger Description
Preconditions
Post conditions

Mainline Scenario
Alistair Cockburn
“Writing
Effective Use
Alternatives flows Cases”
ATM Money Withdraw Example
• Actors: Customer
• Pre Condition:
– ATM must be in a state ready to accept transactions
– ATM must have at least some cash it can dispense
– ATM must have enough paper to print a receipt
• Post Condition:
– The current amount of cash in the user account is the amount before withdraw
minus withdraw amount
– A receipt was printed on the withdraw amount
Actor Actions System Actions
1. Begins when a Customer arrives
at ATM
2. Customer inserts a Credit card 3. System verifies the customer ID
ATM Money
into ATM and status Withdraw
5. Customer chooses “Withdraw” 4. System asks for an operation
operation type Mainline
7. Customer enters the cash
amount
6. System asks for the withdraw
amount
Scenario
8. System checks if withdraw
amount is legal
9. System dispenses the cash
10. System deduces the withdraw
amount from account

11. System prints a receipt


13. Customer takes the cash and 12. System ejects the cash card
the receipt
ATM Money Withdraw (cont.)
• Alternative flow of events:
– Step 3: Customer authorization failed. Display an error message, cancel the
transaction and eject the card.
– Step 8: Customer has insufficient funds in its account. Display an error
message, and go to step 6.
– Step 8: Customer exceeds its legal amount. Display an error message, and go to
step 6.
• Exceptional flow of events:
– Power failure in the process of the transaction before step 9, cancel the
transaction and eject the card.
 Actors: traveler Use Case Description: Change Flight
 Preconditions:
• Traveler has logged on to the system and selected ‘change flight itinerary’
option
 Basic course
1. System retrieves traveler’s account and flight itinerary from client account
database
2. System asks traveler to select itinerary segment she wants to change; traveler
selects itinerary segment.
3. System asks traveler for new departure and destination information; traveler
provides information.
4. If flights are available then
5. …
6. System displays transaction summary.
 Alternative courses
4. If no flights are available then …
Identification of Use Cases
1. Actor-based:
- Identify the actors related to a system or organization.
- For each actor, identify the processes they initiate or participate
in.

2. Event-based
- Identify the external events that the system must respond to.
- Relate the events to actors and use cases.
Example 2: Use Case Model for Course Management Software
• At the beginning of each semester,
– Each professor shall register the courses that he is going to teach.
• A student can select up to four-course offerings.
– During registration a student can request a course catalogue showing course offerings for the
semester.
– Information about each course such as professor, department and prerequisites would be
displayed.
– The registration system sends information to the billing system, so that the students can be
billed for the semester.
• For each semester, there is a period of time during which dropping of courses is
permitted.
• Professors must be able to access the system to see which students signed up for each
of their course offerings.
Course Management Software

Register Example 2:
Course
offering
See
Model Solution
Course
Professor Show List
registration
<<Extend>>

<<External>>
Register
Billing System
course
Student

Drop
Course

Calendar
• Use case name should begin with a verb.
• While use cases do not explicitly imply timing:
– Order use cases from top to bottom to imply timing -- it improves readability.

• The primary actors should appear in the left.


Style Notes
Actors are associated with one or more use cases.

(Ambler, 2005)
• Do not use arrows on the actor-use case relationship.
• To initiate scheduled events include an actor called “time”, or “calendar”
• Do not show actors interacting with each other.
• <<include>> should rarely nest more than 2 levels deep.
• Use cases should be named and organized from the perspective of
the users.

• Use cases should start off simple and at as much high view as
possible.
Effective Use Case
– Can be refined and detailed further. Modelling
• Use case diagrams represent functionality:
– Should focus on the "what" and not the "how".
Class Diagram
• Classes:
– Entities with common features, i.e. attributes and operations.
– Represented as solid outline rectangle with compartments.
– Compartments for name, attributes, and operations.
– Attribute and operation compartments are optional depending on
the purpose of a diagram.
UML Class Representation
• A class represents a set of objects having similar attributes,
operations, relationships and behavior.
Class Name
Window
A class can
size: Size implicitly
Attributes have a few
visibility: boolean association
attributes
display()
Operations hide()
Different representations of the LibraryMember class

LibraryMember LibraryMember LibraryMember

Member Name issueBook( );


Membership Number findPendingBooks( );
Address findOverdueBooks( );
Phone Number returnBook( );
E-Mail Address findMembershipDetails( );
Membership Admission Date
Membership Expiry Date
Books Issued

issueBook( ); Example UML


findPendingBooks( );
findOverdueBooks( ); Classes
returnBook( );
findMembershipDetails( );
What are the Different Types of Relationships
Among Classes?
• Four types of relationships:
– Inheritance
– Association
– Aggregation/Composition
– Dependency
Inheritance
LibraryMember Base Class

• Allows to define a new class (derived class)


by extending an existing class (base class).
Derived
Faculty Students Staff
Classes

–Represents generalization-specialization

–Allows redefinition of the existing methods


(method overriding).
UnderGrad PostGrad Research
Inheritance Example
Animal “A Dog ISA Animal”
“A Cat ISA Animal”

Dog Cat
Inheritance
• Lets a subclass LibraryMember Base Class
inherit attributes
and methods from
Derived
a base class. Faculty Students Staff
Classes

UnderGrad PostGrad Research


Multiple LibraryMember Base Class LibraryMember Base Class

Inheritance

Derived
Faculty Students Staff Faculty Students Staff
Classes

Multiple
Inheritance

UnderGrad PostGrad Research UnderGrad PostGrad Research


Inheritance Implementation in Java
Inheritance is declared using the "extends" keyword
Even when no inheritance defined, the class implicitly extends a class called Object.
Person
class Person{ - name: String
private String name; - dob: Date
private Date dob;
...
}
class Employee extends Person{
private int employeeID; Employee
- employeeID: int
private int salary; - salary: int
private Date startDate; - startDate: Date
...
} Employee anEmployee = new Employee();
Inheritance Example Library
Book

issuable reference

Issuable Reference
Issuable Reference
Single Volume Single Volume
BookSet BookSet
Book Book

Discriminator: allows one to group subclasses into


clusters that correspond to a semantic category.
Inheritance Pitfalls
• Inheritance certainly promotes reuse.
• Indiscriminate use can result in poor quality
programs.
• Base class attributes and methods visible in derived
class…
– Leads to tight coupling
Association Relationship
• How implemented in program?
• Enables objects to communicate with each other:
–One object must “know” the ID of the corresponding
object in the association.
• Usually binary:
–But in general can be n-ary.
Association – example
• In a home theatre system,
– A TV object has an association with a VCR object
• It may receive a signal from the VCR
– VCR may be associated with remote
• It may receive a command to record
1 1 1 1
Remote commands VCR Connected to TV
1-1 Association tax_file
– example
Rakesh Shukla 760901-1234

V. Ramesh
691205-5678
Keshab Parhi

People Tax_files
1 1
People Associated Tax_files
with
motherOf
Multiple
Bhim
Association – motherOf
example Kunti Yudhistir

motherOf
Arjun
Woman Person

1 *
Woman Mother of Person
Association UML Syntax
role B
Class A role A Class B

• A Person works for a Company. Role

Person employee employer Company


works for

Association Name
Association - More Examples

Library Member
1 borrowed by *..5 Book

* eats * Human
Lion

Multiplicity: The number of objects from one class


that relate with a single object in an associated class.
Navigability

opens 0..5
Key * Door
Association – Multiplicity
• A teacher teaches 1 to 3 courses (subjects)
• Each course is taught by only one teacher.
• A student can take between 1 to 5 courses.
• A course can have 10 to 300 students.
1 teaches 1..3
Teacher Course
1..5

takes
Students
10..300
Quiz: Draw Class Diagram
• A Student can take up to five Courses.

• A student needs to enroll in at least one course.

• Up to 300 students can enroll in a course.

• An offered subject in a semester should have at least 10


registered students.
Student credits hasEnrolmentOf Course
10..300 Enrols in 1..5
Student credits hasEnrolmentOf Course
Identify as 10..300 Enrols in 1..5

Correct or
Wrong Student credits hasEnrolmentOf Course
10..300 Enrols in 1..5

Student credits hasEnrolmentOf Course


10..300 Enrols in 1..5

Student credits hasEnrolmentOf Course


10..300 Enrols in 1..5
Quiz: Read the Diagram

1..2 teaches 0..3


Teacher Course

opens 0..5
* Door
Key
Association and Link
• A link:
– An instance of an association
– Exists between two or more objects
– Dynamically created and destroyed as the run of a
system proceeds
• For example:
– An employee joins an organization.
– Leaves that organization and joins a new organization.
Association Relationship
• A class can be associated with itself (unary association).
–Give an example?
• An arrowhead used along with name: *
–Indicates direction of association. Person *
Friend of

• Multiplicity indicates # of instances taking part in the


association.
Node1 Node2 Node3
Computer
Network: Object Node4
Diagram
Node5

Node6 Node7 Node8


has
CPU 1 0..2 Controller Quiz: Read and
understand
UML class
1..4 1 diagram
DiskDrive controls SCSIController
Types of Class Relation
Relationships
Generalization Association Dependency

Binary Association N-ary Association

Aggregation

Composition
Overdoing Associations
• Avoid unnecessary Associations

PersonInfo PersonInfo
Person 1 1 Address Name
Name E-Mail Address
Birthday E-Mail
Birthday

Avoid This… Do This


Aggregation Relationship
• Represents whole-part relationship
• Represented by a diamond symbol at the composite end.
• Usually creates the components:
–Also, aggregate usually invokes the same operations of all its
components.
–This is in contras to plain association
• Usually owner of the components:
–But can share with other classes
Aggregation Relationship

* Paragraph * Line
1
Document 1

* *
1 0..1
Company Person Club
employs memberOf
Aggregation cont…

 An aggregate object contains other objects.

 Aggregation limited to tree hierarchy:

− No circular aggregate relation. Paragraph Line

*
1
Aggregation vs. Inheritance
Inheritance:
Cont…

− Different object types with similar features.


− Necessary semantics for similarity of behavior is in place.

Aggregation:
− Containment allows construction of complex objects.
Composition
• A stronger form of aggregation
– The whole is the sole owner of its part.
• A component can belong to only one whole
– The life time of the part is dependent upon the whole.
• The composite must manage the creation and destruction of its
parts. 1
Circle Point Circle
3..* Point
Polygon
Composition Relationship
• Life of item is same as that of order

1
Order * Item
Composition: Alternate Notation
Car
4 1
Wheel Engine

2 1
Door Chassis
1 1
Axle Steering
Composition
Window whole
• An object may be a part of ONLY
1
one composite at a time.
Whole is responsible for the
creation and disposition of its parts. *
Frame part
• Composition: Aggregation vs. Composition
– Composite and components have the same life line.
• Aggregation:
– Lifelines are different.
• Consider an order object:
– Aggregation: If order items can be
changed or deleted after placing order.
– Composition: Otherwise.
Composition versus Aggregation

*
1
Order Item Composition

*
1
Item Aggregation
Order
Class Dependency

Dependent Class Independent Class


Car

• aggregation: "is part of" 1


Association – Symbolized by empty diamond 1 aggregation

Types Engine

• composition: is made of
Book
– Stronger version of aggregation composition
1
– The parts live and die with the whole *
Page
– Symbolized by a filled diamond
• dependency: Depends on dependency

– Represented by dotted arrow. Lottery Random


Ticket
UML Class Class
Relation Notation Generalization
Relationship
dependency

Summary

Object Object
Aggregation Composition
Object Association Association Association

1..* 1
n n
0..* 0..*

Will always be “1”


Class Diagram Inference Based on Text Analysis
(based on Dennis, 2002)
• A common noun implies a class e.g. Book
• A proper noun implies an object (instance of a class): CSE Dept, OOSD, etc.
• An adjective implies an attribute e.g. price of book
• A “doing” verb implies an operation
– Can also imply a relationship e.g. student issues Book
• A “having” verb implies an aggregation relationship
• A predicate or descriptive verb phrase elaborates an operation e.g. ISBN
numbers are integers
• An adverb implies an attribute of an operation e.g. fast loading of image…
Object Diagram
LibraryMember

Mritunjay LibraryMember
LibraryMember
B10028
C-108, Laksmikant Hall Mritunjay
1119 B10028
Mrituj@cse C-108, Laksmikant Hall
25-02-04 1119
25-03-06 Mrituj@cse
NIL 25-02-04
25-03-06
IssueBook( ); NIL
findPendingBooks( );
findOverdueBooks( ); Different representations of
returnBook( ); the LibraryMember object
findMembershipDetails( );
Interaction Diagram
• Can model the way a group of objects interact to realize some
behaviour.

• How many interaction diagrams to draw?


– Typically each interaction diagram realizes behaviour of a single use
case

– Draw one sequence diagram for each use case.


A First Look at Sequence Diagrams
• Captures how objects interact with each other:
– To realize some behavior (use case execution).
• Emphasizes time ordering of messages.
• Can model:
– Simple sequential flow, branching, iteration, recursion,
and concurrency.

35
Develop One Sequence
diagram for every use case
Return
Book member: :Book
book:Book
LibraryMember Copy

Use ok = canBorrow()
Case borrow(book)
Borrow
Book
Book [ok] borrow(member)

Search setTaken(member)
Book

36
Sequence Diagram
• Shows interaction among objects in a two-dimensional
chart member:
LibraryMember
book:Book
:Book
Copy

• Objects are shown as boxes at top ok = canBorrow()


borrow(book)
• If object created during execution: [ok] borrow(member)

–Then shown at appropriate place in time line setTaken(member)

• Object existence is shown as dashed lines (lifeline)


• Object activeness, shown as a rectangle on lifeline
Sequence Diagram Cont…
• Messages are shown as arrows.
• Each message labelled with corresponding message name.
• Each message can be labelled with some control
information. member:
LibraryMember
book:Book
:Book
Copy

• Two types of control information: borrow(book)


ok = canBorrow()

–condition ([]) [ok] borrow(member)


setTaken(member)

–iteration (*)
member: :Book
book:Book
LibraryMember Copy
• iteration marker *[for all objects]
ok = canBorrow()

• [condition] borrow(book)

[ok] borrow(member)
– message is sent only if the condition is true setTaken(member)

• self-delegation
– a message that an object sends to itself Gist of Syntax
• Loops and conditionals:
– UML2 uses a new notation called interaction frames to support
these
Control logic in Interaction Diagrams
• Conditional Message
– [ variable = value ] message()
– Message is sent only if clause evaluates to true
• Iteration (Looping)
– * [ i := 1..N ] message()
– “*” is required; [ ... ] clause is optional
– The message is sent many times to possibly multiple receiver
objects.
Elements of A Sequence Diagram
X-Axis (objects)
member: :Book
book:Book
LibraryMember Copy
Y-Axis (time)

borrow(book) Life Line


Object
ok = canBorrow()
message
Activation box
[ok] borrow(member)
setTaken(member)

condition
How do you show Mutually exclusive conditional messages?

41
Sequence Diagrams
How to represent Mutually exclusive conditional invocations?

:ClassA :ClassB :ClassC

msg1( ) flag = checkBook()

[flag = true] msg2( )

[flag = false] msg3( )


:Library
:Library
:Library Book :Library
Book :Book
Boundary Renewal Member
Register
Controller
renewBook
renewBook find MemberBorrowing
displayBorrowing
selectBooks
Sequence
bookSelected
* find Diagram for
[reserved] the renew
[reserved] apology
update book use
apology case
confirm

confirm
updateMemberBorrowing
State Machine
Diagrams

9/13/2018
State Chart Diagram Cont…

• State chart avoids two problems of FSM:


– State explosion
– Lack of support for representing concurrency

• A hierarchical state model:


– Can have composite states --- OR and AND states.
Robot: State Variables
• Movement: On, OFF How many states
in the state
• Direction: Forward, Backward, machine model?
left, Right
• Left hand: Raised, Down
• Right hand: Raised, down
FSM: exponential
• Head: Straight, turned left, turned right rise in number of
• Headlight: On, Off states with state
variables
• Turn: Left, Right, Straight
Features of Statecharts
• Two major features are introduced : S1
S2
– nested states
– concurrent states Nested State Diagrams

• Many other features have also been


added: Move
ON
Move
Forward
– History state
– broadcast messages Move
OFF
Move
Backward
– actions on state entry, exit
– … Concurrent State Diagrams
• Elements of state chart diagram State Chart
Diagram
• Initial State: A filled circle
• Final State: A filled circle inside a larger circle
• State: Rectangle with rounded corners
• Transitions: Arrow between states, also boolean logic
condition (guard)
• UML extended state chart is called state machine
How to Encode an FSM?
• Three main approaches:
– Doubly nested switch in loop

– State table

– State Design Pattern


State Table Approach
• From the state machine, we can set up a state transition
table with a column for the actions associated with each
Present Next
transition state
Event
state
Actions

e1 Light_off none
Light_off
e2 Light_on set red LED flashing

e1 Light_on none
Light_on
e2 Light_off reset red LED flashing
OOAD Process
Iterative and Incremental

OOA OOD/OOP
Domain
Specification Definition Model Construction
of of Program
Use
the problem case the solution
model
OOA versus OOD?
• Analysis:
– An elaboration of requirements.
– Independent of any specific implementation
• Design:
– A refinement of the analysis model.
– Takes implementation constraints into account
Design Process
OOA OOD
User interface
Use case Interaction
Issues or GUI
prototype diagram diagram

Start

SRS Domain Class


document model diagram
Code

Glossary
Domain Model Conceptual Class Diagram
Relationships Domain Model

Define terms
Domain
Use Case Model objects Glossary
Functional Requirements

Interaction Diagrams
Dynamic Behavior

You might also like