0% found this document useful (0 votes)
8 views26 pages

Functional Modeling Lecture 5-2024

The document outlines functional modeling concepts, focusing on UML class and sequence diagrams, including relationships such as composition and inheritance. It provides examples and exercises related to class diagrams for a software case study and sequence diagrams for various scenarios, including order placement and machine operations. Additionally, it discusses state diagrams and their syntax, emphasizing the importance of events and transitions in modeling behaviors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views26 pages

Functional Modeling Lecture 5-2024

The document outlines functional modeling concepts, focusing on UML class and sequence diagrams, including relationships such as composition and inheritance. It provides examples and exercises related to class diagrams for a software case study and sequence diagrams for various scenarios, including order placement and machine operations. Additionally, it discusses state diagrams and their syntax, emphasizing the importance of events and transitions in modeling behaviors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Functional Modelling

Marya Butt, PhD.


Researcher Data Driven Smart Society (DDSS)
BIG DATA, Computer Vision, Cloud Computing
Faculty of Engineering Design and Computing
Mob: +31(0) 0611878759
E: marya.butt@Inholland.nl
AGENDA

Recap State &


Class Diagram Sequence
SafeSpray Case
Recap: Class Diagram
Multiplicity and Navigability

Following the arrow, we read: “One Football team
uses properties and/or behaviours of 11 Players in
the role/capacity of ‘player’”

As a result, the football team gets an additional
property: a ‘list’ of 11 Players!

Class TeamDivision

SoccerTeam -player player

- Players : List<player> - shirtnumber: int


Recap: Class Diagram
Relationship type: Composition

A chessboard consists of 64 squares

A square is a component of exactly one
chessboard


Write this down!

ChessBoard Square

+ InitBoard(): boolean - column: int


+ ClearBoard(): void - row: int
+ isLegalMove(): boolean
Recap: Class Diagram
Relationship: Inheritance superclass
base class
Default behaviour is
to withdraw from
BankAccount. But
investment account
behaviour is different,
so his behaviour
must override the subclass
default behaviour! inherits everything
from the superclass

inheritance
inheritance

overriding the
superclass’s
behaviour 5
Mock Exam- Customer Loyalty
Class Diagram

Q3: Create a UML Class diagram for SafeSpray


management software (35 points)​

Points distribution class diagram:​


- Classes (minimum of 4) and attributes (minimum of 5) 15
points​
- Associations with multiplicities 10 points​
- Use of inheritance 5 points​
- Use of composition and/or aggregation 5 points​
- Add methods to the classes (DETAILED CLASS DIAGRAM)
+5 BONUS POINTS
Solution-I
Solution-II

Association between
service &
client is missing <<enum>>

The connection between


Client &
Payment should be a
dependency

Missing aggregation &


compisition
UML Sequence Diagram


Show object instances that play the roles defined in a
collaboration

show the order of the interaction visually by using the
vertical axis of the diagram to represent the time what
messages are sent and when.

show elements as they interact over time, showing
interactions or interaction instances
Sequence diagram: Components
Sequence diagram: Components
Combined Fragments

Common operators
Sequence diagram: example

A class applied in a computer program is usually called an object.

A behaviour applied in a program is usually called an method

actor

object

message: a call for return value


a behaviour
object lifeline
Sequence Diagram: Example Recursive
Combined fragment message as the
account will be
updated(debited
)

you may apply if-else


condition, but don’t forget
to add [guard] for true
and else condition
Sequence Diagram: Example
Use case = Place Order

A shop member can order online, and each


item/device will be sent to the member by
courier or by ordinary mail, depending on
the item's value (more than 15,00$ or less).
Additionally, the online-shop can send a
confirmation notification to the member if
the member has opted for the notification
option.
Sequence Diagram: Example
Combined fragment (solution I)
Courier Mail: : Member
:
Sequence Diagram: Example
Combined fragment (solution II)
Take the primary actor out!

[Value>15,00$]

[else]
Sequence Diagram: Example
Restaurant (place order)

The forward dashed


arrowhead
represents the
creation of a new
object
The condition of
the loop is
missing, which
should be added
on the top-left
corner, e.g. [for
each ordered
item]
Homework
Draw a Sequence diagram of the following
case
Zti manufactures smart machines primarily to facilitate
the food and flower industry. They need the in-holland
students to develop a computer vision-based application
that can detect the crown from strawberries and remove
them without damaging the strawberries.
With a start call from an employee, the machine starts
picking strawberries from bin 1; the claws carry sensors
and cameras. First, the strawberry’s condition is
assessed to see if it is healthy enough to remove the
crown, e.g., unhealthy, diseased, or mushy strawberries
are thrown in bin 2. The crown is removed for healthy
ones, and strawberries are transferred to bin 3. From
there, they are sent for packaging.
State diagram: syntax
initial state state
Defect

transition

TurnOn()

Operational Maintenance

Off()
final state
State Diagram: syntax
Defect
event

FaultReport()

TurnOn()

Operational Maintenance

Repair()

Off()

Events become new methods!
Sorting() 
How does the machine reach
self- the ‘failure’ state?
transition
State Diagram: syntax
Defect
guard(s)

FaultReport()
[part use=too high
TurnOn() Or part= break]

Operational Maintenance

Repair()

Off()

[guard] is a condition for a
Sorting() transition
/NoofUseIncreased() 
/action is a result of a transition
/action

/action also becomes a
State diagram: syntax
Lets Practice UML syntax
1)relationship between usecases

Mandatory
secondary
d e>>
n c lu usecase
<<I
Primary
Usecase <<e
x ten
d>>

Optional
secondary
usecase
2)relationship between actor and
usecases

usecase
3) Aggregation (Class Diagram)
26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy