Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the...

17
Unified Modelling Language UML

Transcript of Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the...

Page 1: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Unified Modelling Language

UML

Page 2: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Use case Diagram:

• A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.

• The use case diagrams describe system functionality as a set of tasks that the system must carry out and actors who interact with the system to complete the tasks.

Page 3: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Use Case:

• Each use case on the diagram represents a single task that the system needs to carry out.

• Fro example (Buy a Product, Add Client …)

One use case

Page 4: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Actor :

• An actor is anything outside the system that interacts with the system to complete a task.

• It could be a user or another system.• actor "uses" the use case to complete a task.

Page 5: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Relationship between use cases:

1- Include : Use the includes link to show that one use

case includes the task described by another use case.

Example:

Page 6: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Relationship between use cases:2- Extend:• Use the Extends link to show that one use case extends the

functionality of another use case at specific Extension Points.• Example:

Page 7: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Relationship between use cases:

• Extend Example :

Page 8: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Relationship between actor and use case:

• Association:The association is the link that is drawn between and

actor and a use case. It indicates which actors interact with the system to complete the various tasks.

Page 9: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

System Boundary:

• It is usual to display use cases as being inside the system and actors as being outside the system.

Page 10: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

General Example of relationship :

Page 11: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Example :uc Manage Users

Client

(from Actors)

Create Account

View Account details

Close Account

View Open Orders

View History

Login

Delete User

Administrator

(from Actors)

«include»

«extend»

«extend»

Page 12: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Example:

• The following sample shows a Use Case Diagram for an on-line CD catalog. The system has a single actor: the on-line customer. The customer can browse the catalog, search for a CD, add a CD to the order, view the order details, and place the order.

• Both "View Order Details" and "Place Order" use "Calculate Order Total".

Page 13: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Example(cont ..)

Page 14: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

University Record System (URS)

• A University record system should keep information about its students and academic staff.

• Records for all university members are to include their id number, surname, given name, email, address, date of birth, and telephone number. – Students and academic staff each have their own unique

ID number: studN (students), acadN (academic employee), where N is an integer (N>0).

Page 15: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

University Record System (ConT…)

• In addition to the attributes mentioned above: – Students will also have a list of subjects they are enrolled

in. A student cannot be enrolled in any more than 10 subjects.

– Academic employees will have a salary, and a list of subjects they teach. An academic can teach no more than 3 subjects.

Page 16: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Some Actions Supported by URS

• The system should be able to handle the following commands.

– Add and remove university members (students, and academic staff)

– Add and Delete subjects– Assign and Un-assign subjects to students– Assign and Un-assign subjects to academic

staff.

Page 17: Unified Modelling Language UML. Use case Diagram : A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.use.

Use Case Diagram URS System

systemuser academic

student

URS

Del member

add member

add subject

del subject

assg subject

unass subject

enrol subject

unenrol subject