Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Lecture 09_System Modeling

The document discusses system modeling in software engineering, covering context, interaction, and structural models. It emphasizes the importance of graphical representations, particularly using UML, to illustrate system boundaries, use cases, and interactions between actors and the system. Key components include use case diagrams, sequence diagrams, and class diagrams, which help in understanding system functionality and architecture.

Uploaded by

dibya.chhando
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 09_System Modeling

The document discusses system modeling in software engineering, covering context, interaction, and structural models. It emphasizes the importance of graphical representations, particularly using UML, to illustrate system boundaries, use cases, and interactions between actors and the system. Key components include use case diagrams, sequence diagrams, and class diagrams, which help in understanding system functionality and architecture.

Uploaded by

dibya.chhando
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 63

CSE327-Software Engineering

Lecture 9: System Modeling

Dr. Md. Sazzad Hossain, PhD (Japan)


Professor
Department of CSE
Mawlana Bhashani Science and Technology University
Email: sazzad.hossain14@northsouth.edu

1
Topics covered

 Context models
 Interaction models
 Structural models

2
Context models

3
System modeling

 System modeling is the process of developing abstract


models of a system, with each model presenting a
different view or perspective of that system.
 System modeling has now come to mean representing a
system using some kind of graphical notation, which is
now almost always based on notations in the Unified
Modeling Language (UML).
 System modelling helps the analyst to understand the
functionality of the system and models are used to
communicate with customers.

4
Context models

 Context models are used to illustrate the operational


context of a system - they show what lies outside the
system boundaries.
 Social and organizational concerns may affect the
decision on where to position system boundaries.
 Architectural models show the system and its
relationship with other systems.

5
System boundaries

 System boundaries are established to define what is


inside and what is outside the system.
 They show other systems that are used or depend on the
system being developed.
 The position of the system boundary has a profound
effect on the system requirements.
 Defining a system boundary is a political judgment
 There may be pressures to develop system boundaries that
increase / decrease the influence or workload of different parts
of an organization.

6
The context of the Mentcare system

7
Interaction models

8
UML diagram types

 Activity diagrams, which show the activities involved in a


process or in data processing .
 Use case diagrams, which show the interactions
between a system and its environment.
 Sequence diagrams, which show interactions between
actors and the system and between system components.
 Class diagrams, which show the object classes in the
system and the associations between these classes.
 State diagrams, which show how the system reacts to
internal and external events.

9
Use case modeling

 Use cases were developed originally to support


requirements elicitation and now incorporated into the
UML.
 Each use case represents a discrete task that involves
external interaction with a system.
 Actors in a use case may be people or other systems.
 Represented diagramatically to provide an overview of
the use case and in a more detailed textual form.

10
Definition

A use case is a set of use-case instances, where each


instance is a sequence of actions a system performs that
yields an observable result of value to a particular actor

11
What is it?

 A formal way of representing how a business system


interacts with its environment.
- A sequence of actions a system performs that yields a
valuable result for a particular actor.

12
Use Cases

 Step 1 Identify the actors


 As we read the scenario, define those people or systems
that are going to interact with the scenario.

 A patient calls the clinic to make an appointment for a yearly checkup.


The receptionist finds the nearest empty time slot in the appointment
book and schedules the appointment for that time slot. "
Questions for Identifying People Actors

 Who is interested in the scenario/system?


 Where in the organization is the scenario/system be used?
 Who will benefit from the use of the scenario/system?
 Who will supply the scenario/system with this information,
use this information, and remove this information?
 Does one person play several different roles?
 Do several people play the same role?
Questions for Identifying Other Actors

 What other entity is interested in the scenario/system?


 What other entity will supply the scenario/system with
this information, use this information, and remove this
information?
 Does the system use an external resource?
 Does the system interact with a legacy system?
Actors

• What is an Actor?
A user or outside system that interacts with the system
being designed in order to obtain some value from that
interaction
 An Actor is outside or external the system.
 It can be a:
 Human
 Peripheral device (hardware)
 External system or subsystem
 Time or time-based event
Represented by stick figure 16
Use Cases

 A use case is a summary of scenarios for a single


task or goal.

 An actor is who or what initiates the events involved


in the task of the use case. Actors are simply roles
that people or objects play.

 So as we read our scenario, what or who is the


actor????
Use Cases

 So as we read our scenario, what or who is the


actor????

 A patient calls the clinic to make an appointment for a yearly


checkup. The receptionist finds the nearest empty time slot in the
appointment book and schedules the appointment for that time slot.
"

 The actor is a Patient.


Use Cases

 The use case is a summary of scenarios for a single


task or goal.

 So What is the Use Case????

 The Use Case is Make Appointment.


 It is a use case for the medical clinic.
Use Cases

 The picture below is a Make Appointment use case for the medical
clinic.
 The actor is a Patient. The connection between actor and use case
is a communication association (or communication for short).

Actors are stick figures. Use cases are ovals. Communications are lines that link
actors to use cases.
Use Case Components

 The use case has three components.

 The use case task referred to as the use case that


represents a feature needed in a software system.

 The actor(s) who trigger the use case to activate.

 The communication line to show how the actors


communicate with the use case.
Use Case Diagram - Use Case
Use Case
Use Cases

 Use case diagrams describe what a system does from


the standpoint of an external observer. The emphasis is
on what a system does rather than how.

 Use case diagrams are closely connected to scenarios.


A scenario is an example of what happens when
someone interacts with the system.

24
Scenario

A scenario is a specific sequence of actions and


interactions between actors and the system.

Example:
A patient calls the clinic to make an appointment for a
yearly checkup. The receptionist finds the nearest empty
time slot in the appointment book and schedules the
appointment for that time slot.

25
Use Case

Labelled using a descriptive verb-noun phrase

Represented by an oval

26
Use Case - Actor

Labelled using a descriptive noun or phrase

Represented by a stick character

27
Use Case - Relationships

Relationships

• Represent communication between actor and use case


• Depicted by line or double-headed arrow line
• Also called association relationship

28
Use Case - Relationships

Boundary
• A boundary rectangle is placed around the perimeter of
the system to show how the actors communicate with the
system.

29
Use-Case Diagram

A use case diagram is a collection of actors, use cases, and their


communications. 30
Use-Case Diagram

Other Types of Relationships for Use Cases

• Generalization
• Include
• Extend

31
Components of Use Case Diagram

Generalization Relationship
• Represented by a line and a hollow arrow
• From child to parent

32
33
Use Case Diagram

Include Relationship:
• Represents the inclusion of the functionality of one use
case within another

• Arrow is drawn from the base use case to the used use
case

Write << include >> above arrowhead line

34
Use Case Diagram

Extend relationship:

• Represents the extension of the use case to include


optional functionality
• Arrow is drawn from the extension use case to the base
use case

Write << extend >> above arrowhead line

35
Example of Relationships

36
Why Use Cases?

• Make it easier, both for developers and customers, to


capture requirements
– A customer can write, or participate in writing, use cases.

• Emphasize the user goals and perspective

• Ability to scale up and down in terms of sophistication and


formality

37
Transfer-data use case

 A use case in the Mentcare system

38
Tabular description of the ‘Transfer data’ use-
case

MHC-PMS: Transfer data


Actors Medical receptionist, patient records system (PRS)
Description A receptionist may transfer data from the Mentcare
system to a general patient record database that is
maintained by a health authority. The information
transferred may either be updated personal information
(address, phone number, etc.) or a summary of the
patient’s diagnosis and treatment.
Data Patient’s personal information, treatment summary
Stimulus User command issued by medical receptionist
Response Confirmation that PRS has been updated
Comments The receptionist must have appropriate security
permissions to access the patient information and the
PRS.

39
Use cases in the Mentcare system involving the
role ‘Medical Receptionist’

40
Assignment#2: (1) Draw a use case diagram for
describing the functional requirements of the following
system.
Consider an online reservation system for a bus company. The bus company
includes several buses and realizes trips to different cities. Each bus is
identified by its plate number and a separately assigned bus number. The trips
are based on a predefined schedule and stop at predefined bus stations. Each
bus can have only one trip per day. Each bus includes a driver and one hostess.
For long trips, the bus will have breaks at service and rest areas. There are two
types of trips, normal trips and express trips. Express trips do not stop at
intermediate stations and get faster at the destination.
Seats can be reserved by customers on the web site of the bus company. The
customer has the option to directly pay for the seat through the website. In that
case, the seat cannot be cancelled (neither by the customer nor by the bus
company). If the customer has not paid for the seat, the bus company can
cancel the seat if the customer does not show up one hour before the trip.
When the reservation is cancelled, the seat will become free and can be sold to
another customer. Both the customer and the company staff must authenticate
themselves for performing operations with the system.
41
Assignment#2: (2) Create a use case diagram

• Lets create a use case diagram for


a. iPod
b. Television set
c. Elevator
d. ATM
e. Online Scrabble game
f. Word Processor

42
Sequence diagrams

 A model describing how groups of objects collaborate in


some behavior over time.

 The diagram captures the behavior of a single use case.

 It shows objects and the messages that are passed


between these objects for the particular use case.

43
Sequence diagrams

 Sequence diagrams are part of the UML and are used to


model the interactions between the actors and the
objects within a system.
 A sequence diagram shows the sequence of interactions
that take place during a particular use case or use case
instance.
 The objects and actors involved are listed along the top
of the diagram, with a dotted line drawn vertically from
these.
 Interactions between objects are indicated by annotated
arrows.
44
Basic notation

45
Example: Online Shopping

In order to develop our sequence diagram we will need the use case text
and the specification class diagram:
Use Case Text: Buy a Product Online
1. Customer browses through catalog and selects items to buy.
2. Customer goes to checkout.
3. Customer fills out shipping information.
4. System presents full pricing information, including shipping information.
5. Customer fills in credit card information.
6. System authorizes purchase.
7. System confirms sale immediately.
8. System sends confirming email to customer.
46
Sequence diagram

47
Sequence diagram for View patient information

48
Sequence
diagram for
Transfer Data
49
Structural models

50
Structural models

 Structural models of software display the organization of


a system in terms of the components that make up that
system and their relationships.
 Structural models may be static models, which show the
structure of the system design, or dynamic models,
which show the organization of the system when it is
executing.
 You create structural models of a system when you are
discussing and designing the system architecture.

51
Class diagrams

 Class diagrams are used when developing an object-


oriented system model to show the classes in a system
and the associations between these classes.
 An object class can be thought of as a general definition
of one kind of system object.
 An association is a link between classes that indicates
that there is some relationship between these classes.
 When you are developing models during the early stages
of the software engineering process, objects represent
something in the real world, such as a patient, a
prescription, doctor, etc.
52
class diagram

53
UML classes and association

54
Classes and associations in the MHC-PMS

55
The Consultation class

56
Generalization

 Generalization is an everyday technique that we use to


manage complexity.
 Rather than learn the detailed characteristics of every
entity that we experience, we place these entities in
more general classes (animals, cars, houses, etc.) and
learn the characteristics of these classes.
 This allows us to infer that different members of these
classes have some common characteristics e.g.
squirrels and rats are rodents.

57
Generalization

 In modeling systems, it is often useful to examine the classes in


a system to see if there is scope for generalization. If changes
are proposed, then you do not have to look at all classes in the
system to see if they are affected by the change.
 In object-oriented languages, such as Java, generalization is
implemented using the class inheritance mechanisms built into
the language.
 In a generalization, the attributes and operations associated with
higher-level classes are also associated with the lower-level
classes.
 The lower-level classes are subclasses inherit the attributes and
operations from their superclasses. These lower-level classes
then add more specific attributes and operations.
58
A generalization hierarchy

59
A generalization hierarchy with added detail

60
Object class aggregation models

 An aggregation model shows how classes that are


collections are composed of other classes.
 Aggregation models are similar to the part-of relationship
in semantic data models.

61
The aggregation association

62
Key points

 A model is an abstract view of a system that ignores system details.


Complementary system models can be developed to show the
system’s context, interactions, structure and behavior.
 Context models show how a system that is being modeled is
positioned in an environment with other systems and processes.
 Use case diagrams and sequence diagrams are used to describe
the interactions between users and systems in the system being
designed. Use cases describe interactions between a system and
external actors; sequence diagrams add more information to these
by showing interactions between system objects.
 Structural models show the organization and architecture of a
system. Class diagrams are used to define the static structure of
classes in a system and their associations.

63

You might also like